Get part of string text only

Hello,

Imagine i have an Input of “123 - 456”
How would I get an output of the 123 part?

String.substring(0,3)

Use substring method or split method

yourString.Substring(0,3)

Thanks
@dvn

@dvn use split. Lets take the input into Str1 variable.
Str1.Split("-"c) will give you array of string. Take ArrayOfString(1).Trim to remove spaces.

1 Like