Uppercase String in Swift

Level 127 keystrokes

Converts "hello" to uppercase with uppercased() and prints "HELLO".

Swift code

// uppercased() returns a new uppercase string; the original is unchanged: HELLO
1print("hello".uppercased())

Output

HELLO
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this Swift code and how often they appear.

  • "× 2
  • (× 2
  • )× 2
  • .× 1

More Swift examples at level 1

← Swift typing practice