[#bsl-basic_string-0fb-operator_subs-06] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0fb.adoc[basic_string<char>]::operator[] :relfileprefix: ../../ :mrdocs: Return a reference providing modifiable access to the character at the specified `position` in this string if `position < length()`, or a reference providing non‐modifiable access to the null‐terminating character if `position == length()`. The behavior is undefined unless `position <= length()`, and, in the case of `position == length()`, the null‐terminating character is not modified through the returned reference. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0fb/reference.adoc[reference] operator[](xref:bsl/basic_string-0fb/size_type.adoc[size_type] position); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#