From Jason Turner

[locale.ctype.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpm1l0icb_/{from.md → to.md} +55 -0
tmp/tmpm1l0icb_/{from.md → to.md} RENAMED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ##### General <a id="locale.ctype.general">[[locale.ctype.general]]</a>
2
+
3
+ ``` cpp
4
+ namespace std {
5
+ template<class charT>
6
+ class ctype : public locale::facet, public ctype_base {
7
+ public:
8
+ using char_type = charT;
9
+
10
+ explicit ctype(size_t refs = 0);
11
+
12
+ bool is(mask m, charT c) const;
13
+ const charT* is(const charT* low, const charT* high, mask* vec) const;
14
+ const charT* scan_is(mask m, const charT* low, const charT* high) const;
15
+ const charT* scan_not(mask m, const charT* low, const charT* high) const;
16
+ charT toupper(charT c) const;
17
+ const charT* toupper(charT* low, const charT* high) const;
18
+ charT tolower(charT c) const;
19
+ const charT* tolower(charT* low, const charT* high) const;
20
+
21
+ charT widen(char c) const;
22
+ const char* widen(const char* low, const char* high, charT* to) const;
23
+ char narrow(charT c, char dfault) const;
24
+ const charT* narrow(const charT* low, const charT* high, char dfault, char* to) const;
25
+
26
+ static locale::id id;
27
+
28
+ protected:
29
+ ~ctype();
30
+ virtual bool do_is(mask m, charT c) const;
31
+ virtual const charT* do_is(const charT* low, const charT* high, mask* vec) const;
32
+ virtual const charT* do_scan_is(mask m, const charT* low, const charT* high) const;
33
+ virtual const charT* do_scan_not(mask m, const charT* low, const charT* high) const;
34
+ virtual charT do_toupper(charT) const;
35
+ virtual const charT* do_toupper(charT* low, const charT* high) const;
36
+ virtual charT do_tolower(charT) const;
37
+ virtual const charT* do_tolower(charT* low, const charT* high) const;
38
+ virtual charT do_widen(char) const;
39
+ virtual const char* do_widen(const char* low, const char* high, charT* dest) const;
40
+ virtual char do_narrow(charT, char dfault) const;
41
+ virtual const charT* do_narrow(const charT* low, const charT* high,
42
+ char dfault, char* dest) const;
43
+ };
44
+ }
45
+ ```
46
+
47
+ Class `ctype` encapsulates the C library `<cctype>` features. `istream`
48
+ members are required to use `ctype<>` for character classing during
49
+ input parsing.
50
+
51
+ The specializations required in [[locale.category.facets]]
52
+ [[locale.category]], namely `ctype<char>` and `ctype<wchar_t>`,
53
+ implement character classing appropriate to the implementation’s native
54
+ character set.
55
+