...

/

Core Methods of String Objects

Core Methods of String Objects

This lesson gets you acquainted with some of the most common built-in functions of strings.

Some of the core methods are discussed in this lesson. You can find a list of all the String methods in Rust documentation of Strings.

Capacity in Bytes

The capacity gives the number of bytes allocated to the String, unlike len which gives the number of bytes taken by the String object. To get the capacity of a variable in ...