Hey, how to subtract a piece of text from variable?
I tried but to no avail, help me someone in this thread?Code:self.variable="1234567890";
self.variable-="0";
Printable View
Hey, how to subtract a piece of text from variable?
I tried but to no avail, help me someone in this thread?Code:self.variable="1234567890";
self.variable-="0";
getsubstr()
substring = getSubStr( string , startIndex , endIndex ); //if endIndex is not set, it may default to string.size
string = "1234567890";
substring = getSubStr( string , 0 , string.size - 1 ); //skip last char '0'
Shouldn't 'string.size - 1' be 'string.size -2'? Because index start at 0 and ends in this case at 9. 'string.size - 1' won't remove any chararacter.
Ok, i am wrong. It will return '12345678'.
Documentation says 'Returns the substring of characters >= <start index> and < <end index>. <end index> is optional';
Thank you serthy :)