How to find repetition of letters in a word

How to find repetition of letters in a word

input : indian

output be like :
i = 2
n=2
d=1
i=1
a=1

Hello Heman,

You can achieve it using string operations and loop action.

Follow the steps:

  1. Find the length of the given “sInputVariable” as “nStringCount”
  2. Loop for “nStringCounter” (length of the “sInputVariable”)
  3. Find substring as (source string: “sInputVariable”, start from: “nCounter” (default value is 1), lenght: 1)
  4. Assign the output of substring action to a variable “sCharacter”
  5. Replace the variable occurence “sCharacter” with " " in “sInputVariable” and assign it to “sOccurence”
  6. Find the length of “sOccurence” as “nCharacterCount”
  7. Substract “nCharacterCount” from “nStringCount” and assign it to “nCharacter”
  8. Use message box to display “sCharacter” = “nCharacter”
  9. Increase the counter variable “nCounter” by 1
1 Like

thank you @Srikanth bro