HFST - Helsinki Finite-State Transducer Technology - C++ API  version 3.9.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hfst-string-conversions.h
1 #ifdef WINDOWS
2 
3 #include <string>
4 #include <cstdio>
5 
6 namespace hfst
7 {
8  /* Convert utf-8 string \a wstr into an ordinary string. */
9  //std::string wide_string_to_string(const std::wstring & wstr);
10  /* Get a line from console input and store it into \a str.
11  \a buffer_size defines maximum of input length.
12  Return whether the read operation was succesful. */
13  bool get_line_from_console(std::string & str, size_t buffer_size, bool keep_newline = false);
14 
15  void set_console_cp_to_utf8();
16 
17  /* Wrapper around fprintf that prints to console output if stream is stdout or stderr.
18  On linux and mac, calls always fprintf directly. */
19  int hfst_fprintf_console(FILE * stream, const char * format, ...);
20 }
21 
22 #endif // WINDOWS