1 00:00:12,960 --> 00:00:16,260 Hello and welcome to the Golang programming language course. 2 00:00:16,650 --> 00:00:22,560 In the previous session, we talked about the fine, the length of this string and indecision. 3 00:00:22,830 --> 00:00:25,800 We want to talk about the other extreme concept. 4 00:00:29,830 --> 00:00:38,560 Trim a string and go land, you can trim extreme in different ways using the following list of functions. 5 00:00:39,760 --> 00:00:46,540 All these functions are defined and strings package, so you have to import systems package in your 6 00:00:46,540 --> 00:00:48,840 program to access this function. 7 00:00:49,630 --> 00:00:50,980 First is trim. 8 00:00:52,840 --> 00:00:59,560 This function is used to train this string all the leading and training Unicode Cook Point, which are 9 00:00:59,740 --> 00:01:01,690 specified in this function. 10 00:01:03,160 --> 00:01:05,350 Now you can see the syntax. 11 00:01:08,640 --> 00:01:16,200 Here is the art represent the current history and contest, the art represents the elements which you 12 00:01:16,200 --> 00:01:18,120 want to train in the given extreme. 13 00:01:19,470 --> 00:01:25,230 Now let's go to the school, get on to illustrate how to train is ringing goal line. 14 00:01:28,790 --> 00:01:36,860 Now, create an initialized to a string is in shorthand creation, first declare its string and assign 15 00:01:36,860 --> 00:01:41,270 value to it, which includes a number of exclamation marks. 16 00:01:42,980 --> 00:01:48,380 So define variable as TR r one calling equals. 17 00:01:49,070 --> 00:01:58,010 Its claymation mark will come to go programming 18 00:02:01,400 --> 00:02:15,440 language and watch a game and declare and other extreme and assign value to it, which contains a number 19 00:02:15,440 --> 00:02:22,130 of assign and thylacine SDR to column, he calls. 20 00:02:23,470 --> 00:02:24,850 At sign at Sign, 21 00:02:28,330 --> 00:02:45,750 this is the we are of go bang and dollar sign dance before trimming the now disparities to various first 22 00:02:45,760 --> 00:02:56,290 display a message AFP the streams before screen 23 00:03:01,330 --> 00:03:03,130 and display two variables. 24 00:03:03,970 --> 00:03:09,430 He is TR long simplicity or wrong. 25 00:03:10,900 --> 00:03:18,580 And in the next line, he is still your tool and says his skill to value right 26 00:03:22,270 --> 00:03:25,750 now training they give in strings using three functions. 27 00:03:25,780 --> 00:03:33,430 First, defining variable life result from column he calls his strings package. 28 00:03:34,640 --> 00:03:43,030 Three things don't screen first name of a string. 29 00:03:43,600 --> 00:03:51,430 In this case, these lists are long and set the string to be trained from the current string. 30 00:03:51,430 --> 00:03:53,830 For the example, here is exclamation marks. 31 00:03:55,090 --> 00:03:55,430 OK? 32 00:03:56,950 --> 00:04:04,210 The tree method removes the exclamation marks where it appears inside the string value and do these 33 00:04:04,210 --> 00:04:05,530 four second variable. 34 00:04:07,000 --> 00:04:20,500 Define another variable like result two column equals call the by cage dot invoked to function name 35 00:04:20,500 --> 00:04:26,680 on this string is SDR tool and set there seem to be trimmed from the current Issing. 36 00:04:26,680 --> 00:04:34,990 For the example, hereis, assign and thylacine at sign and the sign. 37 00:04:36,800 --> 00:04:45,350 Now you want to display the result after tweaking things when you go to the next line and copy these 38 00:04:45,350 --> 00:04:46,280 three lines. 39 00:04:48,650 --> 00:05:05,720 Paced here and extremist after training and change, valuable result, long and resolved to reformat 40 00:05:05,720 --> 00:05:10,200 the cool, save the project and execute the program. 41 00:05:12,860 --> 00:05:20,990 Now we can see the output, we were able to modify our desired string throughout the trim function and 42 00:05:20,990 --> 00:05:29,030 exclamation marks, and the other sign has removed from first and end of extreme value walk in order 43 00:05:29,030 --> 00:05:35,120 not to prolong the time on decision will finish it, and we will continue the content in the next session. 44 00:05:35,130 --> 00:05:35,630 Goodbye.