Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 726 Bytes

string_manipulation.md

File metadata and controls

40 lines (26 loc) · 726 Bytes

String Manipulation

The friendly.bash library provides functions for manipulating strings.

toUpperCase

toUpperCase <string>

Converts a string to uppercase.

: The input string to convert.

Example usage:

result=$(toUpperCase "hello world")
echo "$result"

Output: HELLO WORLD

In the example above, the string "hello world" is converted to uppercase using the toUpperCase function.

toLowerCase

toLowerCase <string>

Converts a string to lowercase.

: The input string to convert.

Example usage:

result=$(toLowerCase "Hello World")
echo "$result"

Output: hello world

In the example above, the string "Hello World" is converted to lowercase using the toLowerCase function.