MCPcopy Create free account
hub / github.com/UI5/webcomponents / utf16leToBytes

Function utf16leToBytes

packages/main/test/pages/diffable-html.js:1821–1835  ·  view source on GitHub ↗
(str, units)

Source from the content-addressed store, hash-verified

1819 }
1820
1821 function utf16leToBytes (str, units) {
1822 var c, hi, lo
1823 var byteArray = []
1824 for (var i = 0; i < str.length; ++i) {
1825 if ((units -= 2) < 0) break
1826
1827 c = str.charCodeAt(i)
1828 hi = c >> 8
1829 lo = c % 256
1830 byteArray.push(lo)
1831 byteArray.push(hi)
1832 }
1833
1834 return byteArray
1835 }
1836
1837 function base64ToBytes (str) {
1838 return base64.toByteArray(base64clean(str))

Callers 1

ucs2WriteFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…