diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-12-30 05:55:23 +0200 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-12-30 05:55:23 +0200 |
commit | 2c6dba2732e338fbadd569d5d2ede6009f41c9c2 (patch) | |
tree | 19d6c2e3cb8cccd8fb4ac861a0d4b601cb5236c5 /src/utilities.cpp | |
parent | 4d09e7c6562b4a2119fb044b97e7296074ce83db (diff) |
fixed #77 #72
Diffstat (limited to 'src/utilities.cpp')
-rwxr-xr-x | src/utilities.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/utilities.cpp b/src/utilities.cpp index cbddeb1..84bcfca 100755 --- a/src/utilities.cpp +++ b/src/utilities.cpp @@ -1939,3 +1939,28 @@ void strip_line_term(std::string &s) for(std::string::size_type i = s.find("\n"); i != std::string::npos; i = s.find("\n", i+1))
s.erase(i, 1);
}
+ +void strip_tags(std::wstring &str)
+{ + std::wstring::size_type p; + if(_tcslen(inopentag)) + { + for(p = str.find(inopentag); p != std::wstring::npos; p = str.find(inopentag)) + str.erase(p, _tcslen(inopentag)); + } + if(_tcslen(inclosetag)) + { + for(p = str.find(inclosetag); p != std::wstring::npos; p = str.find(inclosetag)) + str.erase(p, _tcslen(inclosetag)); + } + if(_tcslen(outopentag)) + { + for(p = str.find(outopentag); p != std::wstring::npos; p = str.find(outopentag)) + str.erase(p, _tcslen(outopentag)); + } + if(_tcslen(outclosetag)) + { + for(p = str.find(outclosetag); p != std::wstring::npos; p = str.find(outclosetag)) + str.erase(p, _tcslen(outclosetag)); + } +}
\ No newline at end of file |