andev
Member
GM Version: Studio
Target Platform: All
Download: Download
Links: <N/A>
It bothers me that the string functions start at id 1 and not 0, because it means you have to add offsets sometimes. So I wrote some pass-through scripts that fix it. Further reading.
All scripts are ready to drag straight into your project at once quickly for maximum convenience. They look like this:
So now to get the first character in a string, you look up ID 0 (not ID 1).
Another example is:
Which will return -1 when it can't find the string (and not 0). Same logic as above applies too.
Download
If I've missed something or something doesn't work, let me know, I'll fix it asap. Thanks
Target Platform: All
Download: Download
Links: <N/A>
It bothers me that the string functions start at id 1 and not 0, because it means you have to add offsets sometimes. So I wrote some pass-through scripts that fix it. Further reading.
All scripts are ready to drag straight into your project at once quickly for maximum convenience. They look like this:
Code:
///str_char_at(str, index)
return string_char_at(argument0,argument1+1);
Another example is:
Code:
///str_pos(substr, str)
return string_pos(argument0,argument1)-1;
Download
If I've missed something or something doesn't work, let me know, I'll fix it asap. Thanks
Last edited by a moderator: