Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

lowercase
julia
string
communitycreator

How to use the lowercase string method in Julia

Programming Bytes

Overview

Julia comes with a built-in function called lowercase(), which can be used to convert a string to lowercase.

Syntax

To use this function, we use the following syntax:

 lowercase(s::AbstractString)
lowercase method syntax

Parameters

The string to be converted to lowercase is passed as an argument.

Return value

This method returns a string that is converted to lowercase.

Code

The code below shows how the lowercase() function works.

#given string
str = "EduCATIVE"

#print the lowercase string 
println(lowercase(str))
Using the lowercase method

Explanation

  • Line 2: We declare and initialize a string variable str with EduCATIVE as a value.
  • Line 5: We pass the str string as a parameter to the lowercase() function. The lowercase method will convert all the characters of the string to lowercase. The resulting value will be educative.

RELATED TAGS

lowercase
julia
string
communitycreator
RELATED COURSES

View all Courses

Keep Exploring