Version 0.59.0

str::to_lower

Converts a string to lowercase letters.

Signatures

  •   string to_lower( string& input )
  •   string to_lower( string& input, int supplement )

Details

The function converts characters of input to their lowercase equivalents if these exist. If no such conversion is possible, the characters are left unchanged.

The basic version without supplement index only covers the Basic Latin letters A - Z. The supplement index allows to additionally choose one additional character range.

Note

In its current form only a limited number of supplementary ranges are supported.

The following table gives an overview of supported supplementary ranges:

Supplement index Unicode number range Name Character range
0 U+0041 - U+005A Basic Latin A - Z
1 U+00C0 - U+00D6, U+00D8 - U+00DE Latin 1 À - Ö, Ø - Þ

Example

 #import( "std/str.sps" )
 string s = "Hello World!";
 echo( str::to_lower( s ) );
 

Output

 hello world!
 

Return value

A string, representing the value of input converted to lowercase.

Parameters

input

String whose value is returned converted to lowercase.

supplement

An index that defines one additional character range that is converted in addition to Basic Latin. Default value is 0 (Basic Latin only).

See also

🗙

Search results for