string TokenLeft(string full, string tokens, int pos)
Useful for grabbing the leftmost tokens of a string. Requires the function, GetTokenPosX.
string TokenLeft(string full, string tokens, int pos) // Excludes token
// Pass: Full string, token delimiters, token to be left of.
// Return: A string returning tokens left of the specified token offset.
// Requires: GetTokenPosX
// Assumes: pos > 0
{
if (pos < 1) return "";
pos = GetTokenPosX(full, tokens, pos, 0);
if (pos == len(full)) return full;
else return left(full, pos);
}There are no talkbacks on this documentation page yet. Post the first?
Doc Nav |
![]() |
Your docs |
![]() |