I'm attempting to split apart a string by "." so that "my.name" returns {"my", "name"}. However, I can't seem to find an in-built method of performing this operation in Liquidity.

Lately, I've tried implementing my own split function by using String.slice, which produces a substring from given indexes. This poses another problem because I have to search through the string for the indexes of ".", which doesn't seem easy either.

Long story short, my current train of thought is to break the string into a list of characters (which I haven't been able to implement), iterate through to find the indexes of ".", and then use String.slice to obtain my list of split phrases.

Is there an easier, straightforward way of splitting strings in Liquidity? If not, how can I implement the above process or alternative solution in Liquidity?

  • Why? There is no easy way to do this because it is not expected to be useful. – Tom Jun 5 '19 at 0:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.