[#BloombergLP-bslstl-StringRefImp-0c-length] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/StringRefImp-0c.adoc[StringRefImp]::length :relfileprefix: ../../../ :mrdocs: Return the length of the string referred to by this object. Note that this call is equivalent to `end() ‐ begin()`. == Synopsis Declared in `<bslstl_stringref.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslstl/StringRefImp-0c/size_type.adoc[StringRefImp<CHAR_TYPE>::size_type] length() const; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#