A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/string.access below:

[string.access]

24 Strings library [strings] 24.3 String classes [string.classes] 24.3.2 Class template basic_­string [basic.string] 24.3.2.5 basic_­string element access [string.access]

const_reference operator[](size_type pos) const; reference operator[](size_type pos);

Returns: *(begin() + pos) if pos < size(). Otherwise, returns a reference to an object of type charT with value charT(), where modifying the object to any value other than charT() leads to undefined behavior.

Complexity: Constant time.

const_reference at(size_type pos) const; reference at(size_type pos);

Throws: out_­of_­range if pos >= size().

Returns: operator[](pos).

const charT& front() const; charT& front();

Effects: Equivalent to: return operator[](0);

const charT& back() const; charT& back();

Effects: Equivalent to: return operator[](size() - 1);


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4