Start learning free

LESSON 62 OF 679 · STRINGS I

Updating Strings in Rust

Lesson

This guided lesson fixes a misspelled name using Rust character collection syntax.


What you will build:

  1. Convert the string to characters, replace the first character with 'A', and collect the characters back into name.

Starter code:

let mut name = "bndrei Chiriac".to_string();

Assignment
Follow the Coding Tutorial and complete the Rust step.

STEP 1 OF 1
    Ctrl + Enter to check