std::basic_string::front

From Cppreference

Jump to: navigation, search
CharT& front();
(C++11 feature)
const CharT& front() const;
(C++11 feature)

Returns reference to the first character in the string.

Contents

[edit] Parameters

(none)

[edit] Return value

reference to the first character.

[edit] Complexity

Constant

[edit] See also

back (C++11)
accesses the last character
(public member function)