scsl 1.0.1
Shimmering Clarity Standard Library
Loading...
Searching...
No Matches
Namespaces | Functions
StringUtil.h File Reference

Utilities for working with strings. More...

#include <algorithm>
#include <string>
#include <vector>
Include dependency graph for StringUtil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  scsl
 scsl is the top-level namespace containing all the code in this library.
 
namespace  scsl::scstring
 String-related utility functions.
 

Functions

void scsl::scstring::TrimLeadingWhitespace (std::string &s)
 
void scsl::scstring::TrimTrailingWhitespace (std::string &s)
 
void scsl::scstring::TrimWhitespace (std::string &s)
 
std::string scsl::scstring::TrimLeadingWhitespaceDup (std::string s)
 
std::string scsl::scstring::TrimTrailingWhitespaceDup (std::string s)
 
std::string scsl::scstring::TrimWhitespaceDup (std::string s)
 
std::vector< std::string > scsl::scstring::SplitKeyValuePair (std::string line, std::string delimiter)
 
std::vector< std::string > scsl::scstring::SplitKeyValuePair (std::string line, char delimiter)
 
std::vector< std::string > scsl::scstring::SplitN (std::string s, std::string delimiter, size_t maxCount=0)
 
std::vector< std::string > scsl::scstring::WrapText (std::string &line, size_t lineLength)
 
void scsl::scstring::WriteTabIndented (std::ostream &os, std::vector< std::string > lines, int tabStop, bool indentFirst)
 
void scsl::scstring::WriteTabIndented (std::ostream &os, std::string line, size_t maxLength, int tabStop, bool indentFirst)
 
std::ostream & scsl::scstring::VectorToString (std::ostream &os, const std::vector< std::string > &svec)
 
std::string scsl::scstring::VectorToString (const std::vector< std::string > &svec)
 

Detailed Description

Utilities for working with strings.

Author
K. Isom kyle@.nosp@m.imap.nosp@m..cc
Date
2023-10-14

Copyright 2023 K. Isom kyle@.nosp@m.imap.nosp@m..cc

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.