xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
string_trimming.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/ustring.h>
6 
8 namespace xtd {
10  namespace drawing {
17  enum class string_trimming {
19  none = 0,
21  character = 1,
23  word = 2,
27  ellipsis_word = 4,
29  ellipsis_path = 5,
30  };
31 
33  inline std::ostream& operator<<(std::ostream& os, string_trimming value) {return os << xtd::to_string(value, {{string_trimming::none, "none"}, {string_trimming::character, "character"}, {string_trimming::word, "word"}, {string_trimming::ellipsis_character, "ellipsis_character"}, {string_trimming::ellipsis_word, "ellipsis_word"}, {string_trimming::ellipsis_path, "ellipsis_path"}});}
34  inline std::wostream& operator<<(std::wostream& os, string_trimming value) {return os << xtd::to_string(value, {{string_trimming::none, L"none"}, {string_trimming::character, L"character"}, {string_trimming::word, L"word"}, {string_trimming::ellipsis_character, L"ellipsis_character"}, {string_trimming::ellipsis_word, L"ellipsis_word"}, {string_trimming::ellipsis_path, L"ellipsis_path"}});}
36  }
37 }
string_trimming
Specifies how to trim characters from a string that does not completely fit into a layout shape...
Definition: string_trimming.h:17
The center is removed from trimmed lines and replaced by an ellipsis. The algorithm keeps as much of ...
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Specifies that text is trimmed to the nearest word, and an ellipsis is inserted at the end of a trimm...
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: date_time.h:1110
Contains xtd::ustring class.
Specifies that the text is trimmed to the nearest character, and an ellipsis is inserted at the end o...
Specifies that text is trimmed to the nearest word.
Specifies that the text is trimmed to the nearest character.