Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::ctype<char>::is

      From cppreference.com
      <cpp‎ |locale‎ |ctype char
       
       
       
      Localization library
       
       
      Defined in header<locale>
      bool is( mask m,char c)const;
      (1)
      constchar* is(constchar* low,constchar* high, mask* vec)const;
      (2)
      1) Checks if the characterc is classified by the maskm according to the classification table returned by the member functiontable(). Effectively calculatestable()[(unsignedchar)c]& m.
      2) For every character in the character array[lowhigh), reads its full classification mask from the classification table returned by the member functiontable() (that is, evaluatestable()[(unsignedchar)*p] and stores it in the corresponding element of the array pointed to byvec.

      If(unsignedchar)c>=std::ctype<char>::table_size, then an implementation-defined value is substituted instead oftable()[(unsignedchar)c], possibly different for different values ofc.

      Contents

      [edit]Parameters

      c - character to classify
      m - mask to use for classifying a single character
      low - pointer to the first character in an array of characters to classify
      high - one past the end pointer for the array of characters to classify
      vec - pointer to the first element of the array of masks to fill

      [edit]Return value

      1)true ifc is classified bym intable(),false otherwise.
      2)high

      [edit]Notes

      Unlike the primary templatestd::ctype, this specialization does not perform a virtual function call when classifying characters. To customize the behavior, a derived class may provide a non-default classification table to the base class constructor.

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]Defect reports

      The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

      DRApplied toBehavior as publishedCorrect behavior
      LWG 28C++98overload (2) copied the values fromvec intotable(),
      which is the reverse of the intended behavior
      corrected

      [edit]See also

      [virtual]
      classifies a character or a character sequence
      (virtual protected member function ofstd::ctype<CharT>)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/locale/ctype_char/is&oldid=160073"

      [8]ページ先頭

      ©2009-2025 Movatter.jp