NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
be_text.h
Go to the documentation of this file.
1/*
2 * This software was developed at the National Institute of Standards and
3 * Technology (NIST) by employees of the Federal Government in the course
4 * of their official duties. Pursuant to title 17 Section 105 of the
5 * United States Code, this software is not subject to copyright protection
6 * and is in the public domain. NIST assumes no responsibility whatsoever for
7 * its use by other parties, and makes no guarantees, expressed or implied,
8 * about its quality, reliability, or any other characteristic.
9 */
10#ifndef __BE_TEXT_H__
11#define __BE_TEXT_H__
12
13#include <locale>
14#include <string>
15#include <vector>
16
17#include <be_error_exception.h>
18#include <be_memory_autoarray.h>
19
20namespace BiometricEvaluation {
21
30 namespace Text {
31
46 std::string
48 const std::string &s,
49 const std::locale &locale = std::locale());
50
64 std::string
66 const std::string &s,
67 const std::locale &locale = std::locale());
68
82 std::string
84 const std::string &s,
85 const std::locale &locale = std::locale());
86
100 std::string
102 const std::string &s,
103 const char trimChar);
104
117 std::string
119 const std::string &s,
120 const char trimChar);
121
134 std::string
136 const std::string &s,
137 const char trimChar);
138
160 std::string
162 const std::string &s,
163 const std::string &digest = "md5");
164
188 std::string
190 const void *buffer,
191 const size_t buffer_size,
192 const std::string &digest = "md5");
193
215 std::vector<std::string>
217 const std::string &str,
218 const char delimiter,
219 bool escape = true);
220
234 std::string
236 const std::string &path);
237
250 std::string
252 const std::string &path);
253
267 bool
269 const std::string &str1,
270 const std::string &str2);
271
284 std::string
286 const std::string &str,
287 const std::locale &locale = std::locale());
288
301 std::string
303 const std::string &str,
304 const std::locale &locale = std::locale());
305
316 std::string
319
332 const std::string &data);
333 }
334}
335#endif /* __BE_TEXT_H__ */
std::string digest(const std::string &s, const std::string &digest="md5")
Compute the digest of a string.
std::string encodeBase64(const BiometricEvaluation::Memory::uint8Array &data)
Perform Base64 encoding.
std::string ltrimWhitespace(const std::string &s, const std::locale &locale=std::locale())
Remove leading whitespace from a string.
std::vector< std::string > split(const std::string &str, const char delimiter, bool escape=true)
Return tokens bound by delimiters and the beginning and end of a string.
std::string toUppercase(const std::string &str, const std::locale &locale=std::locale())
Uppercase a string, respecting locale.
std::string trim(const std::string &s, const char trimChar)
Remove leading and trailing characters from a string.
BiometricEvaluation::Memory::uint8Array decodeBase64(const std::string &data)
Perform Base64 decoding.
std::string rtrim(const std::string &s, const char trimChar)
Remove trailing characters from a string.
std::string basename(const std::string &path)
Extract the filename component of a pathname.
std::string rtrimWhitespace(const std::string &s, const std::locale &locale=std::locale())
Remove trailing whitespace from a string.
std::string trimWhitespace(const std::string &s, const std::locale &locale=std::locale())
Remove leading and trailing whitespace from a string.
std::string toLowercase(const std::string &str, const std::locale &locale=std::locale())
Lowercase a string, respecting locale.
bool caseInsensitiveCompare(const std::string &str1, const std::string &str2)
Compare two ASCII-encoded strings.
std::string ltrim(const std::string &s, const char trimChar)
Remove leading characters from a string.
std::string dirname(const std::string &path)
Extract the directory component of a pathname.
This software was developed at the National Institute of Standards and Technology (NIST) by employees...