Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
correlation::readers::detail Namespace Reference

Functions

std::string_view extractDigits (std::string_view str_view, size_t &pos) noexcept
std::string_view stripLeadingZeros (std::string_view num) noexcept
bool wildcardMatch (std::string_view pattern, std::string_view str) noexcept
 Checks if a string matches a wildcard pattern containing '*' and '?'.
std::vector< std::filesystem::path > matchComponentEntries (std::string_view component_pattern, bool is_last, const std::vector< std::filesystem::path > &candidate_paths)
 Matches directory entries against a component pattern for all candidate paths.
std::vector< std::string > expandWildcardsFilesystem (const std::string &pattern)
 Cross-platform filesystem-based wildcard expansion.

Function Documentation

◆ expandWildcardsFilesystem()

std::vector< std::string > correlation::readers::detail::expandWildcardsFilesystem ( const std::string & pattern)
inline

Cross-platform filesystem-based wildcard expansion.

Parameters
patternWildcard pattern to expand.
Returns
Vector of matching file paths.
Exceptions
std::runtime_errorIf the pattern matches no files.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ extractDigits()

std::string_view correlation::readers::detail::extractDigits ( std::string_view str_view,
size_t & pos )
inlinenoexcept
Here is the caller graph for this function:

◆ matchComponentEntries()

std::vector< std::filesystem::path > correlation::readers::detail::matchComponentEntries ( std::string_view component_pattern,
bool is_last,
const std::vector< std::filesystem::path > & candidate_paths )
inline

Matches directory entries against a component pattern for all candidate paths.

Parameters
component_patternWildcard pattern for the current path component.
is_lastTrue if this is the terminal component in the path.
candidate_pathsCurrent accumulated base paths.
Returns
Vector of matched valid paths.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stripLeadingZeros()

std::string_view correlation::readers::detail::stripLeadingZeros ( std::string_view num)
inlinenoexcept
Here is the caller graph for this function:

◆ wildcardMatch()

bool correlation::readers::detail::wildcardMatch ( std::string_view pattern,
std::string_view str )
inlinenoexcept

Checks if a string matches a wildcard pattern containing '*' and '?'.

Parameters
patternWildcard pattern.
strString to test against the pattern.
Returns
True if pattern matches str, false otherwise.
Here is the caller graph for this function: