diff --git a/components/string.rst b/components/string.rst index eff09aa0361..59098a8bf8d 100644 --- a/components/string.rst +++ b/components/string.rst @@ -125,7 +125,7 @@ There are also some specialized constructors:: $foo = ByteString::fromRandom(12); // CodePointString and UnicodeString can create a string from code points - $foo = UnicodeString::fromCodePoints(0x928, 0x92E, 0x938, 0x94D, 0x924, 0x947); + $foo = (string) UnicodeString::fromCodePoints(0x928, 0x92E, 0x938, 0x94D, 0x924, 0x947); // $foo = 'नमस्ते' Methods to Transform String Objects