Open samer1977 opened 6 months ago
Slicing works for both arrays and strings. Size likewise. contains()
searches for something in strings and arrays. It sounds like what you're asking for?
what Im looking for is similar to charindex function in sql, you pass string input and search char\chars and it will give the index of the first occurance
Hmmm. Looks like you're right that that's missing. If so, it's pretty incredible that we didn't add that before. Yeah, we may have to add that, perhaps by extending index-of()
to work on strings.
We developers always think of string as an array of chars and function that applies to arrays should apply to strings including index-of, size...etc.