replace_string
- Синтаксис
-
native replace_string(text[], maxlength, const search[], const replace[], bool:caseSensitive=true);
Переменная | Описание |
---|---|
text |
String to perform search and replacements on. |
maxlength |
Maximum length of the string buffer. |
search |
String to search for. |
replace |
String to replace the search string with. |
caseSensitive |
If true (default), search is case sensitive. |
- Описание
- Given a string, replaces all occurrences of a search string with a replacement string.
- Пометка
-
Similar to replace_all() stock, but implemented as native and with different algorithm. This native doesn't error on bad buffer size and will smartly cut off the string in a way that pushes old data out.
- Пометка
-
Only available in 1.8.3 and above.
- Возвращает
- Number of replacements that were performed.