From the course: Learning Julia

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Strings in Julia

Strings in Julia - Julia Tutorial

From the course: Learning Julia

Start my 1-month free trial

Strings in Julia

- [Instructor] Okay, now let's take a little bit of a closer look at some of Julia's string types, and some related operations you can do on strings. So, first, remember that Julia provides separate data types for characters and strings. Characters are defined using single quotes like this. So I can say my char is equal to X. You can also convert character values to integers and we'll take a little bit of a closer look at casting values a little bit later in the course. But, for the moment, let me just show you that you can do things like this. I can say, get me the integer value of what my character is, and you can convert the other way as well. So, for example, I can print out the character value of, say, the number 120, okay. So let's quickly run that, so I'll save, and then in the terminal, I'll just go ahead and run "Julia strings start." And you can see that the value of the X character is 120, and then I can go back the other way to get the lowercase X. Okay, let's go back to…

Contents