How we will covert ("INDIA") TO {"I","N","D","I","A"}

How we will covert ("INDIA") TO {"I","N","D","I","A"}. How we will write in expression rule?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Let me introduce you to "code()", which splits any string into an array of the character codes.  Then "char()" which, if applied to an array, provides the characters for those codes (but still in an array).

    char(code("INDIA"))

    Honestly with as much as certain people around here (*ahem*) obsess over coming up with the shortest-possible-code for things even at the sacrifice of any readability, I'm shocked nobody beat me to this Grin
    Edit to add: I see Bejjenki included something similar (but, strangely, more verbose for some reason) in his "2nd way" above. Thumbsup

Reply
  • 0
    Certified Lead Developer

    Let me introduce you to "code()", which splits any string into an array of the character codes.  Then "char()" which, if applied to an array, provides the characters for those codes (but still in an array).

    char(code("INDIA"))

    Honestly with as much as certain people around here (*ahem*) obsess over coming up with the shortest-possible-code for things even at the sacrifice of any readability, I'm shocked nobody beat me to this Grin
    Edit to add: I see Bejjenki included something similar (but, strangely, more verbose for some reason) in his "2nd way" above. Thumbsup

Children