1 00:00:13,620 --> 00:00:17,160 Hello and welcome to the Golang programming language course. 2 00:00:17,460 --> 00:00:24,120 In the previous session, we talked about contains function in history, and in this session we want 3 00:00:24,120 --> 00:00:26,880 to talk about the others extreme concept. 4 00:00:30,650 --> 00:00:32,570 Go Langfield, sponsor. 5 00:00:34,480 --> 00:00:42,820 The fields function breaks a string around each instance of one or more executed whitespace characters 6 00:00:42,820 --> 00:00:43,900 into an array. 7 00:00:45,760 --> 00:00:48,040 Now you can see the scene techs. 8 00:00:48,700 --> 00:00:54,130 Let's go to the school program to illustrate how to use fields function strings. 9 00:00:55,810 --> 00:01:01,750 First, create a string variable and initialize it by a sentence for the example. 10 00:01:03,160 --> 00:01:19,150 Define your variable like Mrs. Carlin equals and set a string value like welcome to go programming language. 11 00:01:23,090 --> 00:01:29,630 Now we want to use brownfields function that get the message barrier, but as arguments and a return 12 00:01:29,630 --> 00:01:31,010 is string alley. 13 00:01:31,760 --> 00:01:36,230 So define a variable like message array. 14 00:01:36,980 --> 00:01:50,630 Cullen equals said string spec package and invoke fields function and sit sage as argument. 15 00:01:53,750 --> 00:02:02,890 Now this really is history at a bowling arranged for a loop for the example, for under a school comma 16 00:02:03,290 --> 00:02:06,710 value colony equals ranch. 17 00:02:07,550 --> 00:02:10,520 He misses very. 18 00:02:12,560 --> 00:02:24,000 And embody a statement of the follow the display, the value of each elements of at a by FP value reform 19 00:02:24,030 --> 00:02:27,710 at the core of the project and execute the program. 20 00:02:29,880 --> 00:02:38,160 Now we can see the output we used from field function and could break a string to each instance of one 21 00:02:38,160 --> 00:02:45,750 or more security by the space character in order not to prolong the time of decision to be finished, 22 00:02:45,750 --> 00:02:48,600 and we will continue the content in the next session. 23 00:02:48,880 --> 00:02:49,470 Goodbye.