Ad space (banner)
๐ŸŸฃJulia Lessons
Lesson 13 / 68

Using the handy built-in functions

This lesson covers Julia's handy built-in functions, with the aim of knowing what you do not have to write yourself.

Convenient functions for handling text come as standard, such as uppercase() and lpad(). Julia's standard library is designed with numerical work and data processing in mind, and simply knowing what is there makes implementation much easier.

The sample code converts to upper case with uppercase("hello"), zero-pads with lpad("7", 3, "0"), and gets an array's length with length([1, 2, 3]). Knowing the string and array functions makes you dramatically faster.

A common early stumble is not knowing what is available and writing the same thing out at length yourself. Getting into the habit of checking the documentation for something similar is worth a great deal.

In professional work, how well you know the standard functions directly affects both code quality and development speed.

๐Ÿ“– Reference code
โœ๏ธ Your code
Type your code, then press "Run"

๐Ÿงช This site can't compile or run Julia directly, so it checks on the spot whether what you typed matches the reference code (scoring happens entirely in your browser โ€” nothing is sent anywhere).

Ad space (banner)
Ad space (in-article)