[#BloombergLP-bslstl-StringRefImp-02-operator_subs] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/StringRefImp-02.adoc[StringRefImp<char>]::operator[] :relfileprefix: ../../../ :mrdocs: Return a reference providing a non‐modifiable access to the character at the specified `index` in the string bound to this reference. This reference remains valid as long as the string currently bound to this object remains valid. The behavior is undefined unless `0 <= index < length()`. == Synopsis Declared in `<bslstl_stringref.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslstl/StringRefImp-02/const_reference.adoc[const_reference] operator[](xref:BloombergLP/bslstl/StringRefImp-0c/size_type.adoc[size_type] index) const; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#