The Open
D
Programming Language
Learn
Language
Library
Contribute
Blog
basic_string_view
core
stdcpp
string_view
D language counterpart to C++ std::basic_string_view.
C++ reference:
version(Supported)
extern (
C
++) @
nogc
struct
basic_string_view (
T
Traits
=
char_traits
!
T
) {
extern (
D
) pragma(
inline
, true) pure nothrow @
nogc
enum
size_type
npos
;
alias
size_type
=
size_t
;
alias
difference_type
=
ptrdiff_t
;
alias
value_type
=
T
;
alias
pointer
=
T
*
;
alias
const_pointer
=
const
(
T
)*
;
alias
toString
=
as_array
;
this
(const(T)[] str);
alias
length
=
size
;
alias
opDollar
=
length
;
size_type
size
();
bool
empty
();
const
(
T
)*
data
();
const
(
T
)[]
as_array
();
const
(
T
)
at
(size_type i);
const
(
T
)
front
();
const
(
T
)
back
();
}
Constructors
this
this
(const(T)[] str)
Alias This
as_array
Members
Aliases
const_pointer
alias
const_pointer
=
const
(
T
)*
difference_type
alias
difference_type
=
ptrdiff_t
length
alias
length
=
size
opDollar
alias
opDollar
=
length
pointer
alias
pointer
=
T
*
size_type
alias
size_type
=
size_t
toString
alias
toString
=
as_array
value_type
alias
value_type
=
T
Functions
as_array
const
(
T
)[]
as_array
()
at
const
(
T
)
at
(size_type i)
back
const
(
T
)
back
()
data
const
(
T
)*
data
()
empty
bool
empty
()
front
const
(
T
)
front
()
size
size_type
size
()
Variables
npos
enum
size_type
npos
;
Meta
Source
See Implementation
core
stdcpp
string_view
aliases
string_view
u16string_view
u32string_view
wstring_view
structs
basic_string_view
char_traits
D language counterpart to C++ std::basic_string_view.
C++ reference: