Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::regex_traits<CharT>::transform

      From cppreference.com
      <cpp‎ |regex‎ |regex traits
       
       
       
      Regular expressions library
      Classes
      (C++11)
      Algorithms
      Iterators
      Exceptions
      Traits
      Constants
      (C++11)
      Regex Grammar
       
       
      template<class ForwardIt>
      string_type transform( ForwardIt first, ForwardIt last)const;

      Obtains the sort key for the character sequence[firstlast), such that if a sort key compares less than another sort key withoperator<, then the character sequence that produced the first sort key comes before the character sequence that produced the second sort key, in the currently imbued locale's collation order.

      For example, when the regex flagstd::regex_constants::collate is set, then the sequence[a-b] would match some characterc1 iftraits.transform("a")<= traits.transform(c1)<= traits.transform("b"). Note that this function takes a character sequence as the argument to accommodate to the ranges defined like[[.ae.]-d].

      Standard library specializations ofstd::regex_traits returnstd::use_facet<std::collate<CharT>>(getloc()).transform(str.data(), str.data()+ str.length()) for some temporary stringstr constructed asstring_type str(first, last).

      [edit]Parameters

      first, last - a pair ofLegacyForwardIterators which determines the sequence of characters to compare
      Type requirements
      -
      ForwardIt must meet the requirements ofLegacyForwardIterator.

      [edit]Return value

      The collation key for the character sequence[firstlast) in the currently imbued locale.

      [edit]Example

      This section is incomplete
      Reason: no example
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/regex/regex_traits/transform&oldid=161052"

      [8]ページ先頭

      ©2009-2025 Movatter.jp