I'm trying to take a text string and divide it into a text array of 8 charac

I'm trying to take a text string and divide it into a text array of 8 characters. Any suggestions? I know you can use apply to run through an array but I can't figure out how to loop through a sting....

OriginalPostID-111174

OriginalPostID-111174

  Discussion posts and replies are publicly visible

Parents
  • There is probably a MUCH simpler solution than this, but it should work:

    =with(local!input:"divide11divide22divide",local!length:len(local!input),local!times:tointeger(roundup(local!length/8,0)),local!array1:repeat(local!times,local!input),local!begins:enumerate(local!times)*8,local!mod:mod(local!length,8),local!right:local!begins+local!mod,array2:apply(fn!right,merge(local!array1,reverse(local!right))),local!array3:apply(fn!left,local!array2,8),local!array3)
Reply
  • There is probably a MUCH simpler solution than this, but it should work:

    =with(local!input:"divide11divide22divide",local!length:len(local!input),local!times:tointeger(roundup(local!length/8,0)),local!array1:repeat(local!times,local!input),local!begins:enumerate(local!times)*8,local!mod:mod(local!length,8),local!right:local!begins+local!mod,array2:apply(fn!right,merge(local!array1,reverse(local!right))),local!array3:apply(fn!left,local!array2,8),local!array3)
Children
No Data