Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::experimental::basic_string_view<CharT,Traits>::data

      From cppreference.com
      <cpp‎ |experimental‎ |basic string view
       
       
       
       
      std::experimental::basic_string_view
       
      constexpr const_pointer data()constnoexcept;
      (library fundamentals TS)

      Returns a pointer to the underlying character array. The pointer is such that the range [data(), data() + size()) is valid and the values in it correspond to the values of the view. (n.b. Unlikebasic_string::data() and string literals,data() may return a pointer to a buffer that is not null-terminated. Therefore it is typically a mistake to passdata() to a routine that takes just aconst CharT* and expects a null-terminated string.)

      Contents

      [edit]Parameters

      (none)

      [edit]Return value

      A pointer to the underlying character array.

      [edit]Complexity

      Constant.

      [edit]See also

      accesses the first character
      (public member function)[edit]
      accesses the last character
      (public member function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/experimental/basic_string_view/data&oldid=93174"

      [8]ページ先頭

      ©2009-2026 Movatter.jp