Files
cell/docs/dull/globals/String.md
2025-02-10 09:48:59 -06:00

50 lines
1.2 KiB
Markdown

# String
### length <sub>number</sub>
### name <sub>string</sub>
### prototype <sub>object</sub>
### fromCharCode(codeUnits) <sub>function</sub>
Return a string created from the specified sequence of UTF-16 code units.
Each argument is treated as a code unit in the range [0, 65535].
**codeUnits**: A series of numbers representing UTF-16 code units.
**Returns**: A string constructed by mapping each code unit to a character.
### fromCodePoint(codePoints) <sub>function</sub>
Return a string created from the specified sequence of code points,
including those above U+FFFF (which will become surrogate pairs).
Throws a RangeError for invalid code points.
**codePoints**: A series of numbers representing Unicode code points.
**Returns**: A string constructed from the given code points.
### raw(template, substitutions) <sub>function</sub>
A tag function of template literals that returns a raw where escape sequences (e.g., '\n', '\u00A9') are not processed.
Commonly used to retrieve the unprocessed text of a template.
**template**: A template literal, or an object with a 'raw' property.
**substitutions**: Additional values to substitute (if any).
**Returns**: The combined raw string from the template.