Code: Select all
put "unwanted text : wanted text" into tText; put offset(":",tText) into tNum; put char tNum to last char of tText
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
put "unwanted text : wanted text" into tText; put offset(":",tText) into tNum; put char tNum to last char of tText
Not so. LC can find the "last" almost anything. But do you see why your code cannot?Obviously this code doesn't work. "last char" isn't recognized by Livecode
A big light just went onFourthWorld wrote:In LiveCode chunk expressions positive numbers start counting from the beginning of the string moving forward and negative numbers start from end of the string moving backwards.
In terms of the "-1" of fields on a card, like, by their ID number? because LC often treats fields as strings, e.g.dunbarx wrote:You cannot get the "-1" of fields.
Code: Select all
put char 3 to char -1 of fld "text"