|
Rcpp Version 1.1.2
|
#include <String.h>
Public Types | |
| typedef internal::string_proxy< STRSXP > | StringProxy |
| typedef internal::const_string_proxy< STRSXP > | const_StringProxy |
Public Member Functions | |
| String () | |
| String (const String &s) | |
| String (SEXP charsxp) | |
| String (const StringProxy &proxy) | |
| String (const StringProxy &proxy, cetype_t enc) | |
| String (const const_StringProxy &proxy) | |
| String (const const_StringProxy &proxy, cetype_t enc) | |
| String (const std::string &s, cetype_t enc=CE_UTF8) | |
| String (String &&s) | |
| String (std::string &&s, cetype_t enc=CE_UTF8) | |
| String (const std::wstring &s, cetype_t enc=CE_UTF8) | |
| String (const char *s, cetype_t enc=CE_UTF8) | |
| String (const wchar_t *s, cetype_t enc=CE_UTF8) | |
| String (int x) | |
| String (double x) | |
| String (bool x) | |
| String (Rcomplex x) | |
| String (Rbyte x) | |
| ~String () | |
| String & | operator= (int x) |
| String & | operator= (double x) |
| String & | operator= (Rbyte x) |
| String & | operator= (bool x) |
| String & | operator= (Rcomplex x) |
| String & | operator= (SEXP x) |
| String & | operator= (const StringProxy &proxy) |
| String & | operator= (const String &other) |
| String & | operator= (const std::string &s) |
| String & | operator= (String &&other) |
| String & | operator= (std::string &&s) |
| String & | operator= (const char *s) |
| String & | operator= (const std::wstring &s) |
| String & | operator= (const wchar_t *s) |
| String & | operator+= (const std::string &s) |
| String & | operator+= (const char *s) |
| String & | operator+= (const std::wstring &s) |
| String & | operator+= (const wchar_t *s) |
| String & | operator+= (const String &other) |
| String & | operator+= (const StringProxy &proxy) |
| String & | operator+= (const const_StringProxy &proxy) |
| String & | operator+= (SEXP x) |
| String & | replace_first (const char *s, const char *news) |
| String & | replace_first (const Rcpp::String &s, const char *news) |
| String & | replace_first (const char *s, const Rcpp::String &news) |
| String & | replace_first (const Rcpp::String &s, const Rcpp::String &news) |
| String & | replace_last (const char *s, const char *news) |
| String & | replace_last (const Rcpp::String &s, const char *news) |
| String & | replace_last (const char *s, const Rcpp::String &news) |
| String & | replace_last (const Rcpp::String &s, const Rcpp::String &news) |
| String & | replace_all (const char *s, const char *news) |
| template<typename LHS, typename RHS> | |
| String & | replace_all (const LHS &s, const RHS &news) |
| String & | replace_all (const Rcpp::String &s, const char *news) |
| String & | replace_all (const char *s, const Rcpp::String &news) |
| String & | replace_all (const Rcpp::String &s, const Rcpp::String &news) |
| String & | push_back (const char *s) |
| String & | push_back (const std::string &s) |
| String & | push_back (const Rcpp::String &s) |
| String & | push_front (const char *s) |
| String & | push_front (const std::string &s) |
| String & | push_front (const Rcpp::String &s) |
| void | set_na () |
| SEXP | get_sexp_impl () const |
| SEXP | get_sexp () const |
| SEXP | get_sexp () |
| operator std::string () const | |
| operator std::wstring () const | |
| const char * | get_cstring () const |
| cetype_t | get_encoding () const |
| void | set_encoding (cetype_t encoding) |
| bool | operator< (const Rcpp::String &other) const |
| bool | operator== (const Rcpp::String &other) const |
| bool | operator!= (const Rcpp::String &other) const |
| bool | operator== (const StringProxy &other) const |
| bool | operator!= (const StringProxy &other) const |
| bool | operator== (const const_StringProxy &other) const |
| bool | operator!= (const const_StringProxy &other) const |
| bool | operator> (const Rcpp::String &other) const |
| bool | operator== (SEXP other) const |
| bool | operator!= (SEXP other) const |
Private Member Functions | |
| template<typename T> | |
| String & | assign_wide_string (const T &s) |
| template<typename T> | |
| String & | append_wide_string (const T &s) |
| bool | is_na () const |
| void | setBuffer () |
| void | setData () |
| template<typename T> | |
| void | append (const T &s) |
Private Attributes | |
| SEXP | data |
| SEXP | token |
| std::string | buffer |
| bool | valid |
| bool | buffer_ready |
| cetype_t | enc |
A single string, i.e. an element of a character vector. This represents CHARSXP SEXP
| typedef internal::const_string_proxy<STRSXP> Rcpp::String::const_StringProxy |
| typedef internal::string_proxy<STRSXP> Rcpp::String::StringProxy |
|
inline |
default constructor
Definition at line 55 of file String.h.
References buffer, buffer_ready, data, enc, Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, token, and valid.
Referenced by append_wide_string(), assign_wide_string(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), push_back(), push_back(), push_back(), push_front(), push_front(), push_front(), replace_all(), replace_all(), replace_all(), replace_all(), replace_all(), replace_first(), replace_first(), replace_first(), replace_first(), replace_last(), replace_last(), replace_last(), replace_last(), String(), and String().

|
inline |
copy constructor
Definition at line 61 of file String.h.
References buffer, buffer_ready, data, enc, get_sexp(), Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, String(), token, and valid.

|
inline |
construct a string from a single CHARSXP SEXP
Definition at line 70 of file String.h.
References buffer_ready, data, enc, Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, token, and valid.

|
inline |
from string proxy
Definition at line 93 of file String.h.
References buffer_ready, data, enc, Rcpp::get(), Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, token, and valid.

|
inline |
Definition at line 98 of file String.h.
References buffer_ready, data, enc, Rcpp::get(), Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, set_encoding(), token, and valid.

|
inline |
from string proxy
Definition at line 105 of file String.h.
References buffer_ready, data, enc, Rcpp::get(), Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, token, and valid.

|
inline |
Definition at line 110 of file String.h.
References buffer_ready, data, enc, Rcpp::get(), Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, set_encoding(), token, and valid.

|
inline |
from a std::string
Definition at line 117 of file String.h.
References buffer, buffer_ready, data, enc, RCPP_STRING_DEBUG, token, and valid.
|
inline |
move constructor
Definition at line 122 of file String.h.
References buffer, buffer_ready, data, enc, RCPP_STRING_DEBUG, String(), token, and valid.

|
inline |
move a std::string
Definition at line 134 of file String.h.
References buffer, buffer_ready, data, enc, RCPP_STRING_DEBUG, token, and valid.
|
inline |
Definition at line 138 of file String.h.
References buffer_ready, data, enc, Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, token, and valid.

|
inline |
from a const char*
Definition at line 144 of file String.h.
References buffer, buffer_ready, data, enc, RCPP_STRING_DEBUG, token, and valid.
|
inline |
Definition at line 150 of file String.h.
References buffer_ready, data, enc, Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, token, and valid.

|
inline |
constructors from R primitives
Definition at line 156 of file String.h.
References buffer_ready, data, enc, Rcpp::Rcpp_PreciousPreserve(), token, and valid.

|
inline |
Definition at line 159 of file String.h.
References buffer_ready, data, enc, Rcpp::Rcpp_PreciousPreserve(), token, and valid.

|
inline |
Definition at line 162 of file String.h.
References buffer_ready, data, enc, Rcpp::Rcpp_PreciousPreserve(), token, and valid.

|
inline |
Definition at line 165 of file String.h.
References buffer_ready, data, enc, Rcpp::Rcpp_PreciousPreserve(), token, and valid.

|
inline |
Definition at line 168 of file String.h.
References buffer_ready, data, enc, Rcpp::Rcpp_PreciousPreserve(), token, and valid.

|
inline |
Definition at line 172 of file String.h.
References data, Rcpp::Rcpp_PreciousRelease(), and token.

|
inlineprivate |
|
inlineprivate |
Definition at line 329 of file String.h.
References buffer_ready, data, DEMANGLE, is_na(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), RCPP_STRING_DEBUG_1, setData(), String(), token, and valid.
Referenced by operator+=(), and operator+=().

|
inlineprivate |
Definition at line 301 of file String.h.
References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), String(), token, and valid.
Referenced by operator=(), and operator=().

|
inline |
Definition at line 574 of file String.h.
References buffer, buffer_ready, and data.
Referenced by operator std::string(), operator std::wstring(), std::hash< Rcpp::String >::operator()(), operator<(), operator>(), push_back(), push_front(), replace_all(), replace_all(), replace_all(), replace_first(), replace_first(), replace_first(), replace_last(), replace_last(), replace_last(), and Rcpp::trimws().
|
inline |
|
inline |
|
inline |
Definition at line 555 of file String.h.
References data, get_sexp_impl(), RCPP_STRING_DEBUG_1, and valid.
Referenced by Rcpp::internal::string_element_converter< RTYPE >::get(), Rcpp::internal::make_charsexp< Rcpp::String >(), operator!=(), operator!=(), operator!=(), operator!=(), std::hash< Rcpp::String >::operator()(), Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::operator=(), operator=(), Rcpp::Na_Proxy::operator==, Rcpp::Na_Proxy::operator==, operator==(), operator==(), operator==(), operator==(), String(), and Rcpp::trimws().

|
inline |
Definition at line 542 of file String.h.
Referenced by get_sexp(), set_encoding(), and setData().
|
inlineprivate |
Definition at line 655 of file String.h.
References data.
Referenced by append_wide_string(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), push_back(), push_back(), push_front(), push_front(), replace_all(), replace_all(), replace_all(), replace_all(), replace_first(), replace_first(), replace_first(), replace_first(), replace_last(), replace_last(), replace_last(), and replace_last().
|
inline |
Definition at line 565 of file String.h.
References get_cstring().

|
inline |
Definition at line 569 of file String.h.
References get_cstring().

|
inline |
Definition at line 621 of file String.h.
References Rcpp::internal::const_string_proxy< RTYPE, StoragePolicy >::get(), and get_sexp().

|
inline |
Definition at line 605 of file String.h.
References get_sexp().

|
inline |
Definition at line 613 of file String.h.
References Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::get(), and get_sexp().

|
inline |
Definition at line 633 of file String.h.
References get_sexp().

|
inline |
Definition at line 321 of file String.h.
References buffer, is_na(), RCPP_STRING_DEBUG, setBuffer(), String(), and valid.

|
inline |
Definition at line 378 of file String.h.
References buffer, buffer_ready, data, is_na(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), RCPP_STRING_DEBUG, setBuffer(), String(), token, and valid.

|
inline |
Definition at line 314 of file String.h.
References buffer, is_na(), RCPP_STRING_DEBUG, setBuffer(), String(), and valid.

|
inline |
Definition at line 346 of file String.h.
References append_wide_string(), and String().

Definition at line 349 of file String.h.
References buffer, buffer_ready, data, is_na(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), RCPP_STRING_DEBUG, setBuffer(), String(), token, and valid.

|
inline |
Definition at line 363 of file String.h.
References buffer, buffer_ready, data, is_na(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), RCPP_STRING_DEBUG, setBuffer(), String(), token, and valid.

|
inline |
Definition at line 347 of file String.h.
References append_wide_string(), and String().

|
inline |
Definition at line 393 of file String.h.
References buffer, buffer_ready, data, is_na(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), RCPP_STRING_DEBUG, setBuffer(), String(), token, and valid.

|
inline |
Definition at line 598 of file String.h.
References get_cstring().

|
inline |
Definition at line 203 of file String.h.
References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), String(), token, and valid.

|
inline |
|
inline |
|
inline |
Definition at line 311 of file String.h.
References assign_wide_string(), and String().

Definition at line 240 of file String.h.
References buffer, buffer_ready, data, enc, get_sexp(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), String(), token, and valid.

|
inline |
Definition at line 229 of file String.h.
References buffer_ready, data, Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::get(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), String(), token, and valid.

|
inline |
Definition at line 312 of file String.h.
References assign_wide_string(), and String().

|
inline |
Definition at line 187 of file String.h.
References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), String(), token, and valid.

|
inline |
Definition at line 179 of file String.h.
References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), String(), token, and valid.

|
inline |
Definition at line 195 of file String.h.
References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), String(), token, and valid.

|
inline |
Definition at line 211 of file String.h.
References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), String(), token, and valid.

|
inline |
Definition at line 219 of file String.h.
References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), String(), token, and valid.

|
inline |
|
inline |
Definition at line 617 of file String.h.
References Rcpp::internal::const_string_proxy< RTYPE, StoragePolicy >::get(), and get_sexp().

|
inline |
Definition at line 602 of file String.h.
References get_sexp().

|
inline |
Definition at line 609 of file String.h.
References Rcpp::internal::string_proxy< RTYPE, StoragePolicy >::get(), and get_sexp().

|
inline |
Definition at line 629 of file String.h.
References get_sexp().

|
inline |
Definition at line 625 of file String.h.
References get_cstring().

|
inline |
Definition at line 504 of file String.h.
References buffer, is_na(), setBuffer(), String(), and valid.
Referenced by push_back(), and push_back().

|
inline |
Definition at line 512 of file String.h.
References get_cstring(), is_na(), push_back(), set_na(), and String().

|
inline |
Definition at line 509 of file String.h.
References push_back(), and String().

|
inline |
Definition at line 518 of file String.h.
References buffer, is_na(), setBuffer(), String(), and valid.
Referenced by push_front(), and push_front().

|
inline |
Definition at line 526 of file String.h.
References get_cstring(), is_na(), push_front(), set_na(), and String().

|
inline |
Definition at line 523 of file String.h.
References push_front(), and String().

|
inline |
Definition at line 467 of file String.h.
References buffer, is_na(), RCPP_STRING_DEBUG_2, setBuffer(), String(), and valid.
Referenced by replace_all(), replace_all(), replace_all(), and replace_all().

|
inline |
Definition at line 493 of file String.h.
References get_cstring(), is_na(), replace_all(), and String().

|
inline |
Definition at line 484 of file String.h.
References replace_all(), and String().

|
inline |
Definition at line 488 of file String.h.
References get_cstring(), is_na(), replace_all(), and String().

|
inline |
Definition at line 498 of file String.h.
References get_cstring(), is_na(), replace_all(), and String().

|
inline |
Definition at line 414 of file String.h.
References buffer, is_na(), RCPP_STRING_DEBUG_2, setBuffer(), String(), and valid.
Referenced by replace_first(), replace_first(), and replace_first().

|
inline |
Definition at line 429 of file String.h.
References get_cstring(), is_na(), replace_first(), and String().

|
inline |
Definition at line 424 of file String.h.
References get_cstring(), is_na(), replace_first(), and String().

|
inline |
Definition at line 434 of file String.h.
References get_cstring(), is_na(), replace_first(), and String().

|
inline |
Definition at line 440 of file String.h.
References buffer, is_na(), RCPP_STRING_DEBUG_2, setBuffer(), String(), and valid.
Referenced by replace_last(), replace_last(), and replace_last().

|
inline |
Definition at line 455 of file String.h.
References get_cstring(), is_na(), replace_last(), and String().

|
inline |
Definition at line 450 of file String.h.
References get_cstring(), is_na(), replace_last(), and String().

|
inline |
Definition at line 460 of file String.h.
References get_cstring(), is_na(), replace_last(), and String().

|
inline |
Definition at line 582 of file String.h.
References data, enc, get_sexp_impl(), Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.
Referenced by String(), and String().

|
inline |
Definition at line 533 of file String.h.
References buffer_ready, data, Rcpp::Rcpp_PreciousPreserve(), Rcpp::Rcpp_PreciousRelease(), token, and valid.
Referenced by push_back(), and push_front().

|
inlineprivate |
Definition at line 656 of file String.h.
References buffer, buffer_ready, char_nocheck(), and data.
Referenced by operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), push_back(), push_front(), replace_all(), replace_first(), and replace_last().

|
inlineprivate |
Definition at line 662 of file String.h.
References data, get_sexp_impl(), Rcpp::Rcpp_PreciousPreserve(), RCPP_STRING_DEBUG, token, and valid.
Referenced by append_wide_string(), and get_sexp().

|
private |
a buffer used to do string operations withough going back to the SEXP
Definition at line 644 of file String.h.
Referenced by append(), get_cstring(), get_sexp_impl(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator=(), operator=(), operator=(), operator=(), operator=(), push_back(), push_front(), replace_all(), replace_first(), replace_last(), setBuffer(), String(), String(), String(), String(), String(), and String().
|
private |
is the buffer initialized
Definition at line 650 of file String.h.
Referenced by append_wide_string(), assign_wide_string(), get_cstring(), operator+=(), operator+=(), operator+=(), operator+=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), set_na(), setBuffer(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), and String().
|
private |
the CHARSXP this String encapsulates
Definition at line 640 of file String.h.
Referenced by append_wide_string(), assign_wide_string(), get_cstring(), get_sexp(), get_sexp(), is_na(), operator+=(), operator+=(), operator+=(), operator+=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), set_encoding(), set_na(), setBuffer(), setData(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), and ~String().
|
private |
the encoding of encapsulated CHARSXP
Definition at line 653 of file String.h.
Referenced by get_encoding(), get_sexp_impl(), operator=(), operator=(), set_encoding(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), and String().
|
private |
Definition at line 641 of file String.h.
Referenced by append_wide_string(), assign_wide_string(), operator+=(), operator+=(), operator+=(), operator+=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), set_encoding(), set_na(), setData(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), and ~String().
|
private |
is data in sync with buffer
Definition at line 647 of file String.h.
Referenced by append_wide_string(), assign_wide_string(), get_sexp(), get_sexp(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), push_back(), push_front(), replace_all(), replace_first(), replace_last(), set_encoding(), set_na(), setData(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), String(), and String().