ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_str Module Reference

This module contains classes and procedures for various string manipulations and inquiries. More...

Data Types

interface  getCharSeq
 Generate and return a scalar string resulting from the concatenation of the individual elements (single-characters) of the input vector of characters.
More...
 
interface  getCharVec
 Generate and return a vector of single-characters each element of which corresponds to one character in the input scalar string.
More...
 
interface  getLenIndent
 Generate and return the number of non-overlapping repetitions of the input pattern in the input str until the first occurrence of a mismatch between pattern and the relevant segment of str.
More...
 
interface  getMaxLoc
 Generate and return the location of the first occurrence of the maximum of the input string(s).
More...
 
interface  getMaxVal
 Generate and return maximum character value in the input string(s).
More...
 
interface  getMinLoc
 Generate and return the location of the first occurrence of the minimum of the input string(s). More...
 
interface  getMinVal
 Generate and return minimum character value in the input string(s).
More...
 
interface  getStrWrapped
 Generate and return the input scalar string wrapped within the specified width while optionally prefixing each line and respecting the initial indentation in all subsequent lines.
More...
 
interface  getTrimmedTZ
 Generate and return a vector of single-characters each element of which corresponds to one character in the input scalar string.
More...
 
interface  isEndedWith
 Generate and return the location of the first occurrence of the minimum of the input string(s). More...
 
interface  operator(.alleq.)
  Generate and return .true. if the input scalar strings are equal (non-lexically), otherwise, return .false.. More...
 

Variables

character(*, SK), parameter MODULE_NAME = "@pm_str"
 
character(*, SK), parameter SPACE = SK_" "
 The space character of default kind SK of length 1. More...
 
character(*, SK), parameter NLC = new_line(SK_"a")
 The newline character of default kind SK as returned by new_line(SK_"a"). More...
 
character(*, SK), parameter UNDEFINED = SK_"UNDEFINED"
 The scalar character parameter of default kind SK containing "UNDEFINED". More...
 

Detailed Description

This module contains classes and procedures for various string manipulations and inquiries.

Developer Remark:
This module and its generic interfaces could have been written for strings of all kinds. However, there is no clear usage for the extended functionality of wrapping non-string arrays. Consequently, it is implemented specifically for strings.
Developer Remark:
Do not change the double back-ticks in
``"(g0,:,',')"``

to single back-ticks in any documentations in this module. Doxygen version 1.9 has difficultly parsing the code sections with single back-tick when the code contains advanced features of modern Fortran g0 edit descriptor.

See also
pm_val2str
pm_strANSI
pm_strASCII
pm_arrayPad
pm_arrayFind
pm_arraySplit
pm_arrayCenter
Test:
test_pm_str


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin

Variable Documentation

◆ MODULE_NAME

character(*, SK), parameter pm_str::MODULE_NAME = "@pm_str"

Definition at line 79 of file pm_str.F90.

◆ NLC

character(*, SK), parameter pm_str::NLC = new_line(SK_"a")

The newline character of default kind SK as returned by new_line(SK_"a").

Definition at line 88 of file pm_str.F90.

◆ SPACE

character(*, SK), parameter pm_str::SPACE = SK_" "

The space character of default kind SK of length 1.

Definition at line 83 of file pm_str.F90.

◆ UNDEFINED

character(*, SK), parameter pm_str::UNDEFINED = SK_"UNDEFINED"

The scalar character parameter of default kind SK containing "UNDEFINED".

Definition at line 93 of file pm_str.F90.