How to find the number of names in variable

I have a name assign to the variable strname

For example
Input:

strname=“Sruthe Dilip”

Output should be 2 since 2 names Sruthe and Dilip
Example 2:
strname=“Sruthe Dilip Sanju”

Output should be 3
Example 3:
strname=“Sruthe”

Output should be 1

@sruthesanju

Try this

str.Split({" "},StringSplitOptions.RemoveEmptyEntries).Count

cheers

Hi @sruthesanju

You can make use of the following function.

image

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.