Hello and welcome to the gold and programming language course in the previous session, we talked about
split this string, and in this session we want to talk about the other extreme concept.
Split after.
Dysfunction split S3 into all saw the strings after each instance of the given separator and returns
a slice which contains these services.
Now you can see the syntax here.
SDR is the string and set is the separator.
If SDR does not contain the given, set and set is not empty, then it will return a slice of length,
one which contain only SDR or if the sip is A. Then it will split after each UTF eight sequence or if
both SDR and SIP are empty, then it in return an entire slice.
Let's go to Waskow program to illustrate how to split after a string.
First, creating an initializing three speed variables defined as zero crawling equals their car comma
to the comma go.
Programming
common language go to next line and define another variable like SDR to call and you call.
My name is Robert and go to the next line and define another variable like SDR three calling calls and
set value.
I am a go programmer.
Now this spelling is very obvious before using ESP adaptive function.
F t SDR one column is still one, and this TR two column said that a utility or two and in the next
line FP is your tree call and said Why you lost your tree.
OK, now is pleading the given string using split after function, for example, splits first into all,
substituting separated by the comma and returns a slice which contains some strings.
Go to the next line.
Define a variable like resolved.
One column equals the strings by cage and involve a split after function.
First, sit ready to test your lawn and set separate or, in this case, be set.
Go to the next line and define another variable life result to column equals
heartstrings that is split after sit variable.
The city are to set a space as separate and define another variable result three column equals the string
start is split after sit variable as two or three and sit exclamation mark as separate now displaying
the result values for the example.
For the result wrong, we display value and type of variable.
So right, if Earth back is less and result one tie color first and key opportunities as Congress and
character for type variable and fetches less T and result one color first and B and set variable result
one and result for now.
Each rate result one extraneous lines and display value of each by the range for you.
So define both look for either a score comma defined variable like value column equals range end result,
one slice go to of statements and print the value.
Now displaying the other variables go out of the loop and FP result to color search result to variable
and in the next line.
If P result three column and said variable result three the format, they could save the project and
execute that program.
Now we can see the output for the first variable defined the common character as a separate or to use
the split after function and drop is a slice of the string as the return value inside the result.
But even and the separator itself is calculated as part of the separated string, then display the value
on time of the resolved one very bit and use the range for Lou to iterate the result on a slice value.
The answer to this for the second and third variables in third variables.
It does not contain the given separator.
Then it will return a slice of links long each contain only itself body value in order not to prolong
the time of decision even finished, and we will continue the content in the next session.
Goodbye.