Cuda battery library
|
#include <string.hpp>
Public Types | |
using | this_type = string<Allocator> |
using | allocator_type = Allocator |
using | value_type = char |
Public Member Functions | |
CUDA | string (size_t n, const allocator_type &alloc=allocator_type()) |
CUDA | string (const allocator_type &alloc=allocator_type()) |
CUDA | string (const char *raw_string, const allocator_type &alloc=allocator_type()) |
template<class Allocator2 > | |
CUDA | string (const string< Allocator2 > &other, const allocator_type &alloc=allocator_type()) |
CUDA | string (const string< allocator_type > &other) |
string (string< allocator_type > &&other)=default | |
CUDA string< allocator_type > & | operator= (string< allocator_type > other) |
string (const std::string &other, const allocator_type &alloc=allocator_type()) | |
CUDA allocator_type | get_allocator () const |
CUDA size_t | size () const |
CUDA char & | operator[] (size_t i) |
CUDA const char & | operator[] (size_t i) const |
CUDA char * | data () |
CUDA const char * | data () const |
CUDA NI void | print () const |
CUDA NI bool | ends_with (const char *suffix) const |
Static Public Member Functions | |
template<class IntegerType > | |
CUDA static NI this_type | from_int (IntegerType x, const allocator_type &alloc=allocator_type()) |
Friends | |
template<class Alloc2 > | |
class | string |
template<class Alloc1 , class Alloc2 > | |
CUDA friend bool | operator== (const string< Alloc1 > &lhs, const string< Alloc2 > &rhs) |
string
represents a fixed sized array of characters based on vector<char>
. All strings are null-terminated.
using battery::string< Allocator >::this_type = string<Allocator> |
using battery::string< Allocator >::allocator_type = Allocator |
using battery::string< Allocator >::value_type = char |
|
inline |
Allocate a string of size n
using allocator
.
|
inline |
|
inline |
Allocate a string from raw_string
using allocator
.
|
inline |
Copy constructor with an allocator.
|
inline |
Redefine the copy constructor to be sure it calls a constructor with an allocator.
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
friend |