A non-owning, immutable view of device data that is a variable length char array representing a UTF-8 string.
More...
|
CUDA_HOST_DEVICE_CALLABLE size_type | size_bytes () const |
| Return the number of bytes in this string.
|
|
CUDA_DEVICE_CALLABLE size_type | length () const |
| Return the number of characters in this string.
|
|
CUDA_HOST_DEVICE_CALLABLE const char * | data () const |
| Return a pointer to the internal device array.
|
|
CUDA_HOST_DEVICE_CALLABLE bool | empty () const |
| Return true if string has no characters.
|
|
CUDA_DEVICE_CALLABLE const_iterator | begin () const |
| Return new iterator pointing to the beginning of this string.
|
|
CUDA_DEVICE_CALLABLE const_iterator | end () const |
| Return new iterator pointing past the end of this string.
|
|
CUDA_DEVICE_CALLABLE char_utf8 | operator[] (size_type pos) const |
| Return single UTF-8 character at the given character position. More...
|
|
CUDA_DEVICE_CALLABLE size_type | byte_offset (size_type pos) const |
| Return the byte offset from data() for a given character position. More...
|
|
CUDA_DEVICE_CALLABLE int | compare (const string_view &str) const |
| Comparing target string with this string. Each character is compared as a UTF-8 code-point value. More...
|
|
CUDA_DEVICE_CALLABLE int | compare (const char *str, size_type bytes) const |
| Comparing target string with this string. Each character is compared as a UTF-8 code-point value. More...
|
|
CUDA_DEVICE_CALLABLE bool | operator== (const string_view &rhs) const |
| Returns true if rhs matches this string exactly.
|
|
CUDA_DEVICE_CALLABLE bool | operator!= (const string_view &rhs) const |
| Returns true if rhs does not match this string.
|
|
CUDA_DEVICE_CALLABLE bool | operator< (const string_view &rhs) const |
| Returns true if this string is ordered before rhs.
|
|
CUDA_DEVICE_CALLABLE bool | operator> (const string_view &rhs) const |
| Returns true if rhs is ordered before this string.
|
|
CUDA_DEVICE_CALLABLE bool | operator<= (const string_view &rhs) const |
| Returns true if this string matches or is ordered before rhs.
|
|
CUDA_DEVICE_CALLABLE bool | operator>= (const string_view &rhs) const |
| Returns true if rhs matches or is ordered before this string.
|
|
CUDA_DEVICE_CALLABLE size_type | find (const string_view &str, size_type pos=0, size_type count=-1) const |
| Returns the character position of the first occurrence where the argument str is found in this string within the character range [pos,pos+n). More...
|
|
CUDA_DEVICE_CALLABLE size_type | find (const char *str, size_type bytes, size_type pos=0, size_type count=-1) const |
| Returns the character position of the first occurrence where the array str is found in this string within the character range [pos,pos+n). More...
|
|
CUDA_DEVICE_CALLABLE size_type | find (char_utf8 character, size_type pos=0, size_type count=-1) const |
| Returns the character position of the first occurrence where character is found in this string within the character range [pos,pos+n). More...
|
|
CUDA_DEVICE_CALLABLE size_type | rfind (const string_view &str, size_type pos=0, size_type count=-1) const |
| Returns the character position of the last occurrence where the argument str is found in this string within the character range [pos,pos+n). More...
|
|
CUDA_DEVICE_CALLABLE size_type | rfind (const char *str, size_type bytes, size_type pos=0, size_type count=-1) const |
| Returns the character position of the last occurrence where the array str is found in this string within the character range [pos,pos+n). More...
|
|
CUDA_DEVICE_CALLABLE size_type | rfind (char_utf8 character, size_type pos=0, size_type count=-1) const |
| Returns the character position of the last occurrence where character is found in this string within the character range [pos,pos+n). More...
|
|
CUDA_DEVICE_CALLABLE string_view | substr (size_type start, size_type length) const |
| Return a sub-string of this string. The original string and device memory must still be maintained for the lifetime of the returned instance. More...
|
|
CUDA_HOST_DEVICE_CALLABLE | string_view () |
| Default constructor represents an empty string.
|
|
CUDA_HOST_DEVICE_CALLABLE | string_view (const char *data, size_type bytes) |
| Create instance from existing device char array. More...
|
|
| string_view (const string_view &)=default |
|
| string_view (string_view &&)=default |
|
string_view & | operator= (const string_view &)=default |
|
string_view & | operator= (string_view &&)=default |
|
A non-owning, immutable view of device data that is a variable length char array representing a UTF-8 string.
The caller must maintain the device memory for the lifetime of this instance.
This may be used to wrap a device pointer and size but any member function that requires accessing the device memory must be called from a kernel.
Definition at line 63 of file string_view.hpp.