Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   Como hago un replace en delphi ?? (https://www.clubdelphi.com/foros/showthread.php?t=43905)

hperez 23-05-2007 19:14:11

Como hago un replace en delphi ??
 
nesecito saber como reemplazar una caracter 'a' por un caracter ´b´ en una cadena

gluglu 23-05-2007 19:21:20

Busca en la ayuda del Foro 'StringReplace'.

Te saldrán varias ayudas al respecto. :rolleyes:

Bicho 23-05-2007 19:22:43

De la ayuda de delphi

Cita:

StringReplace function

Returns a string with occurrences of one substring replaced by another substring.

Unit

SysUtils

Category

string handling routines

type
TReplaceFlags = set of (rfReplaceAll, rfIgnoreCase);
function StringReplace(const S, OldPattern, NewPattern: string; Flags: TReplaceFlags): string;

Description

StringReplace replaces occurrences of the substring specified by OldPattern with the substring specified by NewPattern. StringReplace assumes that the source string, specified by S, may contain Multibyte characters.

If the Flags parameter does not include rfReplaceAll, StringReplace only replaces the first occurrence of OldPattern in S. Otherwise, all instances of OldPattern are replaced by NewPattern.

If the Flags parameter includes rfIgnoreCase, The comparison operation is case insensitive.
Espero te sirva.

Saludos

juanlaplata 23-05-2007 19:32:00

Código Delphi [-]
Uses StrUtils;

AnsiReplaceStr(dondeCambio,queCambio,porCualLoCambio) ;
Espero te sirva, suerte.


La franja horaria es GMT +2. Ahora son las 08:06:24.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi