Video consists of Split function of string manipulation.
Below are the detailed explanation of split function with an example.
1. If we need to split a string any character or text we will be using split function.
for example : we need to split "Hello world, I am a bot", there are few basic methods to split the string if we want to split the string with , character.
a. split (String, ",") - we need to declare string value in the parameter section of split function.
Second parameter we need to give is the character or text which we need to split the string.
b. String.split(","c) - We need to assign split function after the string variable.
In the parameter of split function we need to give the text or the character to split the string with giving c function.
This split method splits the whole string in character and then split it with , character and store the separated text.
c. String.Split(" ".ToCharArray) - We need to assign split function after the string variable.
In the parameter of split function we need to give the text or the character to split the string with giving tochararray function.
This split method splits the whole string in character and then split it with , character and store the separated text in an array.
Ещё видео!