Hello and welcome to the Golang programming language course.
In the previous session, we talked about contains function in history, and in this session we want
to talk about the others extreme concept.
Go Langfield, sponsor.
The fields function breaks a string around each instance of one or more executed whitespace characters
into an array.
Now you can see the scene techs.
Let's go to the school program to illustrate how to use fields function strings.
First, create a string variable and initialize it by a sentence for the example.
Define your variable like Mrs. Carlin equals and set a string value like welcome to go programming language.
Now we want to use brownfields function that get the message barrier, but as arguments and a return
is string alley.
So define a variable like message array.
Cullen equals said string spec package and invoke fields function and sit sage as argument.
Now this really is history at a bowling arranged for a loop for the example, for under a school comma
value colony equals ranch.
He misses very.
And embody a statement of the follow the display, the value of each elements of at a by FP value reform
at the core of the project and execute the program.
Now we can see the output we used from field function and could break a string to each instance of one
or more security by the space character in order not to prolong the time of decision to be finished,
and we will continue the content in the next session.
Goodbye.