SILICON
Loading...
Searching...
No Matches
SILICON::ui::indentation Namespace Reference

Functions

std::string_view trimLeft (std::string_view value)
std::string_view trimRight (std::string_view value)
std::string leadingWhitespace (const std::string_view line)
std::string codePortion (const std::string_view line, const std::regex &strippedPortions)
bool regexSearch (const std::string_view value, const std::regex &expression)
bool endsWithWord (const std::string_view value, const std::string_view word)
void addIndentLevel (std::string &indentation, const int indentWidth)
void removeIndentLevel (std::string &indentation, const int indentWidth)

Function Documentation

◆ addIndentLevel()

void addIndentLevel ( std::string & indentation,
const int indentWidth )

Definition at line 78 of file indentationUtils.cpp.

◆ codePortion()

std::string codePortion ( std::string_view line,
const std::regex & strippedPortions )
nodiscard

Masks each regex match with spaces before structural matching.

Definition at line 48 of file indentationUtils.cpp.

◆ endsWithWord()

bool endsWithWord ( const std::string_view value,
const std::string_view word )
nodiscard

Definition at line 67 of file indentationUtils.cpp.

◆ leadingWhitespace()

std::string leadingWhitespace ( const std::string_view line)
nodiscard

Definition at line 40 of file indentationUtils.cpp.

◆ regexSearch()

bool regexSearch ( const std::string_view value,
const std::regex & expression )
nodiscard

Definition at line 62 of file indentationUtils.cpp.

◆ removeIndentLevel()

void removeIndentLevel ( std::string & indentation,
const int indentWidth )

Definition at line 83 of file indentationUtils.cpp.

◆ trimLeft()

std::string_view trimLeft ( std::string_view value)
nodiscard

Definition at line 25 of file indentationUtils.cpp.

◆ trimRight()

std::string_view trimRight ( std::string_view value)
nodiscard

Definition at line 33 of file indentationUtils.cpp.