View Full Version : how to delete some chars from string?
how to delete some chars from string?
For example: PHP - http://ru2.php.net/manual/en/function.substr.php
McFlurry
02-19-2012, 15:48
stock StringSubString(const String:input[], startindx, endindx, String:dest[], maxlength)
{
Format(dest, maxlength, input[startindx]);
if(strlen(input) > endindx)
{
ReplaceString(dest, maxlength, input[endindx], "");
}
}
The input can be the same as the dest.
how to delete some chars from string?
For example: PHP - http://ru2.php.net/manual/en/function.substr.php
Sourcepawns strings don't work like in PHP.
If you just want to cut some chars at the end of the string the most efficient way is:
string[x] = '\0';
where x is the position where to cut.
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.