gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
StringUtils.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #ifndef STRING_UTILS_H
7 #define STRING_UTILS_H
8 
9 #include <string.h>
10 #include <string>
11 #include <vector>
12 
13 void SwapBytes(char *array, int size, int n);
14 std::string ExtractDoubleQuotedString(const char *str, int len);
15 std::string SanitizeTeXString(const char *in, int equation);
16 std::string FixWindowsPath(const std::string &in);
17 std::string FixRelativePath(const std::string &reference,
18  const std::string &in);
19 std::vector<std::string> SplitFileName(const std::string &fileName);
20 std::string GetFileNameWithoutPath(const std::string &fileName);
21 std::string ConvertFileToString(const std::string &fileName);
22 void ReplaceSubStringInPlace(const std::string &olds, const std::string &news,
23  std::string &str);
24 std::string ReplaceSubString(const std::string &olds, const std::string &news,
25  const std::string &str);
26 void ConvertToHTML(std::string &in);
27 bool SplitOptionName(const std::string &fullName, std::string &category,
28  std::string &name, int &index);
29 std::vector<std::string> SplitString(const std::string &msg, char separator,
30  bool removeWhiteSpace = false);
31 std::string RemoveWhiteSpace(const std::string &s);
32 bool IsOnelabName(const std::string &name, std::string &cleanName);
33 
34 #endif
ReplaceSubString
std::string ReplaceSubString(const std::string &olds, const std::string &news, const std::string &str)
Definition: StringUtils.cpp:140
GetFileNameWithoutPath
std::string GetFileNameWithoutPath(const std::string &fileName)
Definition: StringUtils.cpp:113
SplitFileName
std::vector< std::string > SplitFileName(const std::string &fileName)
Definition: StringUtils.cpp:93
FixWindowsPath
std::string FixWindowsPath(const std::string &in)
Definition: StringUtils.cpp:65
ReplaceSubStringInPlace
void ReplaceSubStringInPlace(const std::string &olds, const std::string &news, std::string &str)
Definition: StringUtils.cpp:130
SplitOptionName
bool SplitOptionName(const std::string &fullName, std::string &category, std::string &name, int &index)
Definition: StringUtils.cpp:156
ConvertToHTML
void ConvertToHTML(std::string &in)
Definition: StringUtils.cpp:148
SwapBytes
void SwapBytes(char *array, int size, int n)
Definition: StringUtils.cpp:16
IsOnelabName
bool IsOnelabName(const std::string &name, std::string &cleanName)
Definition: StringUtils.cpp:225
ConvertFileToString
std::string ConvertFileToString(const std::string &fileName)
Definition: StringUtils.cpp:119
ExtractDoubleQuotedString
std::string ExtractDoubleQuotedString(const char *str, int len)
Definition: StringUtils.cpp:27
SanitizeTeXString
std::string SanitizeTeXString(const char *in, int equation)
Definition: StringUtils.cpp:39
SplitString
std::vector< std::string > SplitString(const std::string &msg, char separator, bool removeWhiteSpace=false)
Definition: StringUtils.cpp:210
picojson::array
value::array array
Definition: picojson.h:194
FixRelativePath
std::string FixRelativePath(const std::string &reference, const std::string &in)
Definition: StringUtils.cpp:77
RemoveWhiteSpace
std::string RemoveWhiteSpace(const std::string &s)
Definition: StringUtils.cpp:182