std-method

str::to_lowercase

Create lowercase text according to Unicode casing rules, including relevant context. It is not full case folding or locale-tailored matching. Expected stdout (not executed): rust فارسی Common mistake: Assuming all scripts have case or using lowercase as universal identity comparison.

Formal Syntax & Structure

rust syntaxrust
fn to_lowercase(&self) -> String

Working Example

Example Snippetrust
fn main() {    println!("{}", "RUST فارسی".to_lowercase());}
Rust Reference