Convert a string to lowercase in Julia – lowercase() and lowercasefirst() Methods
The lowercase()
is an inbuilt function in julia which is used to return a string with all characters converted to lowercase.
Syntax: lowercase(s::AbstractString)
Parameters:
- s::AbstractString: Specified string.
Returns: It returns a string with all characters converted to lowercase.
Example:
println(lowercase( "GFG" ))
println(lowercase( "GEEKS" ))
println(lowercase( "GEEKSFORGEEKS" ))
|
Output:
gfg
geeks
geeksforgeeks
lowercasefirst
The lowercasefirst()
is an inbuilt function in julia which is used to return a string with first character converted to lowercase.
Syntax: lowercasefirst(s::AbstractString)
Parameters:
- s::AbstractString: Specified string.
Returns: It returns a string with first character converted to lowercase.
Example:
println(lowercasefirst( "GFG" ))
println(lowercasefirst( "GEEKS" ))
println(lowercasefirst( "GEEKSFORGEEKS" ))
|
Output:
Last Updated :
01 Apr, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...