Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

char to upper case rust

let c: char = 'i';
let vec_upper: Vec<char> = c.to_uppercase().collect(); // vec_upper = ['I']
// if in the language you're working the uppercase of a char is always one char
let c_upper = vec_upper[0]; // c_upper = 'I'
// more in general you would put all the chars in vec_upper in a string
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #char #upper #case #rust
ADD COMMENT
Topic
Name
4+8 =