diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-12-09 00:14:48 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-12-09 00:14:48 (GMT) |
| commit | 05148e8a8db3a413edb711108fd860d3ee83154f (patch) | |
| tree | dd14ac13354b581580570a91a990ba80f672d19d /src/Format.h | |
| parent | 226de5b6f88c95a4f76675be067de1af5de13902 (diff) | |
| download | powder-05148e8a8db3a413edb711108fd860d3ee83154f.zip powder-05148e8a8db3a413edb711108fd860d3ee83154f.tar.gz | |
C++erific text cleaner function, also, it's a good idea to actually clean text coming from signs...
Diffstat (limited to 'src/Format.h')
| -rw-r--r-- | src/Format.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Format.h b/src/Format.h index 0aae25b..0fd63a1 100644 --- a/src/Format.h +++ b/src/Format.h @@ -26,6 +26,10 @@ namespace format std::string URLEncode(std::string value); std::string UnixtimeToDate(time_t unixtime, std::string dateFomat = "%d %b %Y"); std::string UnixtimeToDateMini(time_t unixtime); + std::string CleanString(std::string dirtyString, int maxVisualSize, int maxStringLength); + std::string CleanString(std::string dirtyString, int maxStringLength = std::string::npos); + std::string CleanString(char * dirtyData, int maxVisualSize, int maxStringLength); + std::string CleanString(char * dirtyData, int maxStringLength); std::vector<char> VideoBufferToPNG(const VideoBuffer & vidBuf); std::vector<char> VideoBufferToPPM(const VideoBuffer & vidBuf); std::vector<char> VideoBufferToPTI(const VideoBuffer & vidBuf); |
