![]() |
![]() |
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| DelevopersTScript APIStringReplace |
TVariable StringReplace( const BYTE *search, const BYTE *replace, unsigned int *count = NULL ); TVariable StringReplace( const char16_t *search, const char16_t *replace, unsigned int *count = NULL ); TVariable StringReplace( const TVariable &search, const TVariable &replace, unsigned int *count = NULL );
| search | The search string or search array, to be matched against the underlining string value. |
| replace | The replacement string or set of replacement values. |
| count | Return the count of successful matches and replacements. |
If the array is used, the position of the search array is replaced with the same position of the replacement array, if the replacement array is shorter, then the last value is repeated.
This method will return a TVariable of the same type as the original TVariable.
TVariable var("123");
MessageBox(NULL,var.StringReplace("1","2").WString(),L"",0);//return "223"
Copyright © 2007-2009, Ekky Software Pty Ltd.