Hey,
I find myself often needing to find the index of a substring *after* the substring.
So I end up with this pattern a lot:
str.left(std.indexOf("something") + strlen("something"))
str.left(std.indexOf("something") + strlen("something"))
To copy to clipboard, switch view to plain text mode
or
str.left(std.indexOf("something") + 9)
str.left(std.indexOf("something") + 9)
To copy to clipboard, switch view to plain text mode
In one case I have to count chars by hand, in the other I have to duplicate the string.
Is there a better way to do it?
Bookmarks