May 2019
Beginner to intermediate
466 pages
10h 44m
English
Strings can be treated as a list of characters, so we can index into them—that is, access the character at a certain position in the word:
julia> str = "Nice to see you" julia> str[1] 'N': ASCII/Unicode U+004e (category Lu: Letter, uppercase)
The first character of the string Nice to see you is N.
Indexing in Julia is 1-based, which means that the first element of a list is found at index 1. This can be surprising if you've programmed before, given that most programming languages use 0-based indexing. However, I assure you that 1-based indexing makes for a very pleasant and straightforward coding experience.
Read now
Unlock full access