String.fromCodePoint(). Fix #219.

This commit is contained in:
Bob Nystrom
2015-03-27 07:43:36 -07:00
parent 373770a8d5
commit 7d45dda383
23 changed files with 166 additions and 43 deletions
+12
View File
@@ -31,6 +31,18 @@ on string *return* byte indices too. So, for example, this does what you want:
In general, methods on strings will work in terms of code units if they can do
so efficiently, and will otherwise deal in bytes.
## Static Methods
### String.**fromCodePoint**(codePoint)
Creates a new string containing the UTF-8 encoding of `codePoint`.
It is a runtime error if `codePoint` is not an integer between `0` and
`0x10ffff`, inclusive.
:::dart
String.fromCodePoint(8225) // "‡"
## Methods
### **contains**(other)