ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
This module contains procedures and generic interfaces for stripping a given pattern from the left and right ends of an array of arbitrary intrinsic type and kind.
More...
Data Types | |
interface | getSIL |
Generate and return index , the index of the first element of the input array such that array(1:index-1) contains only full repetitions of the user-specified pattern . More... | |
interface | getSIR |
Generate and return index , the index of the last element of the input array such that array(index+1:) contains only full repetitions of the user-specified pattern . More... | |
interface | getStripped |
Generate and return the input array modified such that all instances of the input pattern are stripped from its both sides or only the side specified. More... | |
Variables | |
character(*, SK), parameter | MODULE_NAME = "@pm_arrayStrip" |
This module contains procedures and generic interfaces for stripping a given pattern from the left and right ends of an array of arbitrary intrinsic type and kind.
The functionalities of the getStripped generic interface of this module are similar to the strip()
method of Python strings.
However, keep in mind that returning an allocatable
stripped copy of the input can be an expensive operation.
If performance matters, use instead the generic interfaces getSIL for left-stripping getSIR for right-stripping.
These indexing avoid the unnecessary and costly allocation
s, potentially leading to much faster runtime performance.
subroutine
equivalents of the function
interface getStripped of this module were deemed unnecessary.
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.
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.
character(*,SK), parameter pm_arrayStrip::MODULE_NAME = "@pm_arrayStrip" |
Definition at line 64 of file pm_arrayStrip.F90.