Split String
In This Article
Splits the current string into two or three parts, depending on the current selection or cursor position:
- If nothing is selected, the string is split into two parts by the current cursor position.
- If a part of a string is selected, the string is split into three parts: to the left of the selection, inside the selection, to the right of the selection.
#Availability
Available from the context menu or via shortcuts:
- when the cursor is somewhere within a string.
- when a part of a string is selected.
Note
If the selection includes the first or the last symbol of a string, the refactoring is unavailable.
#Notes
- This refactoring is the opposite of Concatenate Strings.
#Examples
string str = "My te│st string";
Dim str As String = "My te│st string"
Result:
string str = "My te" │+ "st string";
Dim str As String = "My te" │+ "st string"