@@ -145,6 +145,16 @@ Each string object can be transformed into the other two types of objects::
145145If the conversion is not possible for any reason, you'll get an
146146:class: `Symfony\\ Component\\ String\\ Exception\\ InvalidArgumentException `.
147147
148+ There is also a method to get the bytes stored at some position::
149+
150+ // ('नमस्ते' bytes = [224, 164, 168, 224, 164, 174, 224, 164, 184,
151+ // 224, 165, 141, 224, 164, 164, 224, 165, 135])
152+ b('नमस्ते')->bytesAt(0); // [224]
153+ u('नमस्ते')->bytesAt(0); // [224, 164, 168]
154+
155+ b('नमस्ते')->bytesAt(1); // [168]
156+ u('नमस्ते')->bytesAt(1); // [224, 164, 184, 224, 165, 141]
157+
148158Methods Related to Length and White Spaces
149159~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150160
@@ -367,12 +377,6 @@ These methods are only available for ``ByteString`` objects::
367377 b('Lorem Ipsum')->isUtf8(); // true
368378 b("\xc3\x28")->isUtf8(); // false
369379
370- // returns the value of the byte stored at the given position
371- // ('नमस्ते' bytes = [224, 164, 168, 224, 164, 174, 224, 164, 184,
372- // 224, 165, 141, 224, 164, 164, 224, 165, 135])
373- b('नमस्ते')->byteCode(0); // 224
374- b('नमस्ते')->byteCode(17); // 135
375-
376380Methods Added by CodePointString and UnicodeString
377381~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
378382
0 commit comments