Ver la Versión Completa : Como hago un replace en delphi ??
hperez
23-05-2007, 19:14:11
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
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
Uses StrUtils;
AnsiReplaceStr(dondeCambio,queCambio,porCualLoCambio) ;
Espero te sirva, suerte.
vBulletin v3.6.8, Derechos ©2000-2024, Jelsoft Enterprises Ltd.