diff options
Diffstat (limited to 'src/tests/kat_bigint.cpp')
-rw-r--r-- | src/tests/kat_bigint.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tests/kat_bigint.cpp b/src/tests/kat_bigint.cpp index c19b6cc23..fe63f8b85 100644 --- a/src/tests/kat_bigint.cpp +++ b/src/tests/kat_bigint.cpp @@ -22,6 +22,32 @@ using namespace Botan; namespace { +void strip_comments(std::string& line) + { + if(line.find('#') != std::string::npos) + line = line.erase(line.find('#'), std::string::npos); + } + +void strip_newlines(std::string& line) + { + while(line.find('\n') != std::string::npos) + line = line.erase(line.find('\n'), 1); + } + +/* Strip comments, whitespace, etc */ +void strip(std::string& line) + { + strip_comments(line); + +#if 0 + while(line.find(' ') != std::string::npos) + line = line.erase(line.find(' '), 1); +#endif + + while(line.find('\t') != std::string::npos) + line = line.erase(line.find('\t'), 1); + } + std::vector<std::string> parse(const std::string& line) { const char DELIMITER = ':'; |