C Library Functions - lower (3)
NAME
lower(3f) - [M_strings:CASE] changes a string to lowercase over
specified range
(LICENSE:PD)
CONTENTS
Synopsis
Description
Options
Returns
Trivia
Examples
Author
License
SYNOPSIS
elemental pure function lower(str,begin,end) result (string)
character(*), intent(in) :: str
integer,optional :: begin, end
character(len(str)) :: string ! output string
DESCRIPTION
lower(str) returns a copy of the ASCII input string with all
characters converted to miniscule (ie. "lowercase") over the
specified range, If no range is specified the entire string is
converted to miniscule.
OPTIONS
|
str |
string to convert to miniscule
|
|
begin |
optional starting position in "str" to begin converting to
miniscule. Defaults to the beginning of the string (ie. "1").
|
|
end |
optional ending position in "str" to stop converting to
miniscule. Defaults to the end of the string (ie. "len(str)").
|
|
RETURNS
|
lower |
copy of the entire input string with all characters converted to
miniscule over optionally specified range.
|
|
TRIVIA
The terms "uppercase" and "lowercase" date back to the early days
of the mechanical printing press. Individual metal alloy casts of
each needed letter or punctuation symbol were meticulously added to a
press block, by hand, before rolling out copies of a page. These metal
casts were stored and organized in wooden cases. The more-often-needed
miniscule letters were placed closer to hand, in the lower cases of
the work bench. The less often needed, capitalized, majuscule letters,
ended up in the harder to reach upper cases.
EXAMPLES
Sample program:
program demo_lower
use M_strings, only: lower
implicit none
character(len=:),allocatable :: s
s= ABCDEFG abcdefg
write(*,*) mixed-case input string is ....,s
write(*,*) lower-case output string is ...,lower(s)
end program demo_lower
Expected output
mixed-case input string is .... ABCDEFG abcdefg
lower-case output string is ... abcdefg abcdefg
AUTHOR
John S. Urban
LICENSE
Public Domain
| Nemo Release 3.1 | lower (3) | June 29, 2025 |
Generated by manServer 1.08 from 6986af97-c69b-427b-9d91-08c4a1740c5f using man macros.