The D Programming Language's Unofficial Docs
beta
Dlang.org
Get Help
basic_string_view
core
stdcpp
string_view
D language counterpart to C++ std::basic_string_view. * C++ reference:
extern (
C
++) @
nogc
extern (
C
++)
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
()
;
version
(
CppRuntime_Windows
)
const_pointer
_Mydata
;
version
(
CppRuntime_Windows
)
size_type
_Mysize
;
version
(
CppRuntime_Gcc
)
size_t
_M_len
;
version
(
CppRuntime_Gcc
)
const
(
T
)*
_M_str
;
version
(
CppRuntime_Clang
)
const
value_type
*
__data
;
version
(
CppRuntime_Clang
)
size_type
__size
;
}
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
;
core
stdcpp
string_view
aliases
string_view
u16string_view
u32string_view
wstring_view
structs
basic_string_view
char_traits
Suggestion Box / Bug Report
D language counterpart to C++ std::basic_string_view. * C++ reference: