NuMFor 9f2ab49 (2024-04-08)
Numerical (Modern) Fortran. Library for Simple Numerical computing
|
provides routines for common string manipulation More...
Data Types | |
interface | str |
str() converts a number (integer or real) to a string More... | |
Modules | |
module | strings |
This module defines functions to manipulate strings of characters. Description. | |
Functions/Subroutines | |
pure character(len=:) function, allocatable, public | upper (s) |
Returns a copy of the string converted to uppercase. | |
pure character(len=:) function, allocatable, public | lower (s) |
Returns a copy of the string converted to lowercase. | |
pure character(len=:) function, allocatable, public | swapcase (s) |
Return str with case of letters swapped. | |
pure character(len=:) function, allocatable, public | reverse (s) |
Reverse a string. | |
pure logical function, public | endswith (s, suffix) |
Return True if S starts with the specified prefix, False otherwise. | |
pure logical function, public | startswith (s, prefix) |
Return True if S starts with the specified prefix, False otherwise. | |
pure character(len=:) function, allocatable, public | lstrip (s, chars) |
This function returns a copy of the string with leading chars removed. | |
pure character(len=:) function, allocatable, public | rstrip (s, chars) |
This function returns a copy of the string with trailing chars removed. | |
pure character(len=:) function, allocatable, public | strip (s, chars) |
This function returns a copy of the string with leading and trailing chars removed. | |
pure integer function | count_sub (s, sub, start, end) |
Return the number of occurrences of substring sub in string S[start:end]. | |
pure logical function, public | issub (s, sub) |
Returns .True. if sub is present in S, .False. otherwise. | |
pure character(len=:) function, allocatable, public | rjust (s, width, fillchar) |
Returns a right-justified string of length width. | |
pure character(len=:) function, allocatable, public | ljust (s, width, fillchar) |
Returns a left-justified string of length width. | |
pure character(len=:) function, allocatable, public | zfill (s, width) |
Pad a string with zeroes ("0") to specified width. If width is <= input string width, then the original string is returned. | |
character(len=:) function, allocatable, public | center (s, width, fillchar) |
Center a string to a specified width. The default character to fill in the centered string is a blank character. | |
integer function, public | find (s, sub, start, end) |
Return the lowest index in S where substring sub is found. | |
character(len=:) function, allocatable, public | replace (s, old, new, count) |
Return a copy with all occurrences of substring old replaced by new. | |
integer function, public | str2i (s_in) |
character(len=:) function, allocatable | z2str (zin) |
z2str gives a string representation of a complex number | |
function | zarr2str (vec) |
function | dparr2str (vec) |
function | rarr2str (vec) |
function | iarr2str (vec) |
character(len=:) function, allocatable | dparr2d2str (vec) |
character(len=:) function, allocatable | rarr2d2str (vec) |
character(len=:) function, allocatable | iarr2d2str (vec) |
character(len=:) function, allocatable | zarr2d2str (vec) |
provides routines for common string manipulation