Hello and welcome to the Golang programming language course.
In the previous session, we talked about the fine, the length of this string and indecision.
We want to talk about the other extreme concept.
Trim a string and go land, you can trim extreme in different ways using the following list of functions.
All these functions are defined and strings package, so you have to import systems package in your
program to access this function.
First is trim.
This function is used to train this string all the leading and training Unicode Cook Point, which are
specified in this function.
Now you can see the syntax.
Here is the art represent the current history and contest, the art represents the elements which you
want to train in the given extreme.
Now let's go to the school, get on to illustrate how to train is ringing goal line.
Now, create an initialized to a string is in shorthand creation, first declare its string and assign
value to it, which includes a number of exclamation marks.
So define variable as TR r one calling equals.
Its claymation mark will come to go programming
language and watch a game and declare and other extreme and assign value to it, which contains a number
of assign and thylacine SDR to column, he calls.
At sign at Sign,
this is the we are of go bang and dollar sign dance before trimming the now disparities to various first
display a message AFP the streams before screen
and display two variables.
He is TR long simplicity or wrong.
And in the next line, he is still your tool and says his skill to value right
now training they give in strings using three functions.
First, defining variable life result from column he calls his strings package.
Three things don't screen first name of a string.
In this case, these lists are long and set the string to be trained from the current string.
For the example, here is exclamation marks.
OK?
The tree method removes the exclamation marks where it appears inside the string value and do these
four second variable.
Define another variable like result two column equals call the by cage dot invoked to function name
on this string is SDR tool and set there seem to be trimmed from the current Issing.
For the example, hereis, assign and thylacine at sign and the sign.
Now you want to display the result after tweaking things when you go to the next line and copy these
three lines.
Paced here and extremist after training and change, valuable result, long and resolved to reformat
the cool, save the project and execute the program.
Now we can see the output, we were able to modify our desired string throughout the trim function and
exclamation marks, and the other sign has removed from first and end of extreme value walk in order
not to prolong the time on decision will finish it, and we will continue the content in the next session.
Goodbye.