nlib
UnicodeNormalizer.h
Go to the documentation of this file.
1 
2 #pragma once
3 #ifndef INCLUDE_NN_NLIB_UNICODE_UNICODENORMALIZER_H_
4 #define INCLUDE_NN_NLIB_UNICODE_UNICODENORMALIZER_H_
5 
6 #include "nn/nlib/Config.h"
7 
8 NLIB_NAMESPACE_BEGIN
9 
10 class InputStream;
11 class OutputStream;
12 class TextWriter;
13 
14 namespace unicode {
15 
17  public:
18  enum NormalizationForm { NFC, NFD, NFKC, NFKD };
19  static errno_t Normalize(InputStream* istr, OutputStream* ostr, NormalizationForm form);
20 
21  static void DumpTable(TextWriter* w); // for debug
22  static uint32_t CheckTable(const uint32_t* data, size_t nwords); // for test
23  static bool CheckNormalizationTxt(const uint32_t* data); // for test
24 };
25 
26 } // namespace unicode
27 NLIB_NAMESPACE_END
28 
29 #endif // INCLUDE_NN_NLIB_UNICODE_UNICODENORMALIZER_H_
#define NLIB_VIS_PUBLIC
Symbols for functions and classes are made available outside of the library.
Definition: Platform_unix.h:61
NormalizationForm
Specifies the unicode normalization format.
Class used to normalize a unicode string.
The base class for input streams. This class cannot be instantiated.
Definition: InputStream.h:16
A file that contains the configuration information for each development environment.
The class for writing text to streams.
Definition: TextWriter.h:20
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
Definition: Config.h:211
The base class for output streams. This class cannot be instantiated.
Definition: OutputStream.h:17
int errno_t
Indicates with an int-type typedef that a POSIX error value is returned as the return value...
Definition: NMalloc.h:24