From the course: Learning the Go Standard Library
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Parsing strings with strconv - Go Tutorial
From the course: Learning the Go Standard Library
Parsing strings with strconv
- [Instructor] All right, the strconv package makes it easy to convert strings to and from basic Go data types such as, integers and floating point numbers. So here in the documentation, for the strconv package at this link, you can see that there's quite a few functions if I scroll down. There's quite a few functions in this package but we're going to concentrate on the ones that perform conversions. So, if you want to explore this package further, I suggest taking some time at the end of this video to try out some of your own experiments. So let's go open up our sample code in the editor. All right, so here in the parse folder, let's open up strparse_start, and I'm going to uncomment my imports for the fmt and strconv packages, and you can see in the main function, I have a couple of sample variables defined, which we'll make use of in a moment. So first, let's illustrate a common mistake that some Go programmers make…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
The strings package1m 31s
-
(Locked)
Basic string operations7m 34s
-
(Locked)
String searching7m 13s
-
(Locked)
String manipulation9m 46s
-
(Locked)
Using the Map function6m 52s
-
(Locked)
Using string builder6m 18s
-
(Locked)
Parsing strings with strconv9m 11s
-
(Locked)
String tests with Unicode5m 16s
-
(Locked)
-
-
-
-