Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::basic_ios<CharT,Traits>::narrow

      From cppreference.com
      <cpp‎ |io‎ |basic ios
       
       
       
       
      char narrow( char_type c,char dfault)const;

      Converts a current locale-specific characterc to its standard equivalent. The result is converted fromchar_type tochar if needed. If no conversion can be performed, the function returnsdfault.

      Effectively callsstd::use_facet<std::ctype<char_type>>(getloc()).narrow(c, dfault);.

      [edit]Parameters

      c - character to convert
      dfault - character to return if the conversion was unsuccessful

      [edit]Return value

      Character converted to its standard equivalent and then tochar.dfault is returned if the conversion fails.

      [edit]See also

      widens characters
      (public member function)[edit]
      invokesdo_narrow
      (public member function ofstd::ctype<CharT>)[edit]
      narrows a wide character to a single-byte narrow character, if possible
      (function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/io/basic_ios/narrow&oldid=180008"

      [8]ページ先頭

      ©2009-2025 Movatter.jp