[Solved] How to delete part of string indicated after a character? [duplicate]

[ad_1]

This is what you want:

var subdividedStringArray = str.componentsSeparatedByString("|#|")

now you have an array with 2 strings, you can access the first one with:

str = subdividedStringArray[0]

or:

str = subdividedStringArray.first

0

[ad_2]

solved How to delete part of string indicated after a character? [duplicate]