Split a string

I need to split string “5.5”18:9MaxVisionHD+” on ”. I need help on this.

1 Like

Hey @Shashi123,

Just use dataString.split(""""c)

dataString should be replaed by your variable name please.

This will output an array of string separated by " You can then manipulate it as per your need.

Hope this helps

Thanks :slight_smile:

Hi @Shashi123,

Provide the same output?

Regards,
Arivu

i want 5.5” out of the string

1 Like

it is not working. getting error out of index.

1 Like

dataString.Substring(0, dataString.IndexOf(""""))

This should help you.

Thanks

sorry.
But its not working. If possible can you share the xaml file. I tried but its not working

1 Like

Can you please give me the exact string ?

The character after 5.5 is it a double quote ?

5.5”18:9MaxVisionHD+ this is the string.

1 Like

Hi @Shashi123

StrValue.SunString(0,3)
Or

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

Regards,
Arivu

Hey @Shashi123,

I have performed two methods for you.

  1. String Split
  2. Substring

Both methods works for anytype of string value - 5.5", 18.50", 45.0"

The problem here is the string quote is of different character. (Just for preserving the same format of character used notepad)

PFA - StringSplit.zip (2.3 KB)

Output for reference

image

Thanks :slight_smile:

1 Like

Sorry the split command does not work. Problem with substring is its not going to be 5.5 always. it can be 18.20 also

Thank u. it worked

1 Like

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