~/bend-docscommunity

decode_utf16.bend checks

raw source on the hub · import 0x67fd5084c1da4adc13317822045bb11f/decode_utf16.bend as Decode_utf16

1 import
import Base

Definitions

def valid source · line 4 · raw

@units:List<&2, U32> -> Bool

JS strings are UTF-16 code-unit sequences, including lone surrogates. Bend String is Unicode-scalar text; no invalid Chr is constructed here.

def empty source · line 8 · raw

@units:List<&2, U32> -> Bool

def compared source · line 12 · raw

@+head:U32 -> @other:List<&2, U32> -> @next:(@_:List<&2, U32> -> Bool) -> Bool

def equal source · line 16 · raw

@left:List<&2, U32> -> @right:List<&2, U32> -> Bool

def scalar source · line 20 · raw

@+code:U32 -> @rest:List<&2, U32> -> @bmp:Bool -> List<&2, U32>

def text source · line 24 · raw

@value:String -> List<&2, U32>

def checked source · line 28 · raw

@+left:List<&2, U32> -> @+right:List<&2, U32> -> Bool

def show source · line 30 · raw

@units:List<&2, U32> -> String