Open In App

Convert a string to lowercase in Julia – lowercase() and lowercasefirst() Methods

Improve
Improve
Like Article
Like
Save
Share
Report

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:




# Julia program to illustrate 
# the use of lowercase() method
   
# Getting a string with all 
# characters converted to lowercase
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:




# Julia program to illustrate 
# the use of lowercasefirst() method
   
# Getting a string with first
# character converted to lowercase
println(lowercasefirst("GFG"))
println(lowercasefirst("GEEKS"))
println(lowercasefirst("GEEKSFORGEEKS"))


Output:


Last Updated : 01 Apr, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads