[#absl-Cord-operator_subs]
= xref:absl.adoc[absl]::xref:absl/Cord.adoc[Cord]::operator&lsqb;&rsqb;
:relfileprefix: ../../
:mrdocs:

Gets the &quot;i&quot;th character of the Cord and returns it, provided that 0 &lt;&equals; i &lt; Cord&period;size()&period;

== Synopsis

Declared in `&lt;absl&sol;strings&sol;cord&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
char
operator&lsqb;&rsqb;(size&lowbar;t i) const;
----

== Description

NOTE&colon; This routine is reasonably efficient&period; It is roughly logarithmic based on the number of chunks that make up the cord&period; Still, if you need to iterate over the contents of a cord, you should use a CharIterator&sol;ChunkIterator rather than call operator&lsqb;&rsqb; repeatedly in a loop&period;

== Return Value

The character at index `i`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *i*
| The index of the character to retrieve&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
