Limited availability
Uint8Array.fromHex()
ã¯éçã¡ã½ããã§ãæ°ãã Uint8Array
ãªãã¸ã§ã¯ãã 16 鲿ååãã使ãã¾ãã
ãã®ã¡ã½ããã¯ãæååããã¤ãé
åã«è§£éãã¾ããæååãåä¸ã®æ°å¤ã«å¤æããã«ã¯ã代ããã« parseInt()
颿°ãã radix
ã 16
ã«è¨å®ãã¦ä½¿ç¨ãã¦ãã ããã
Uint8Array.fromHex(string)
弿°
string
Uint8Array
ã«å¤æãããã¤ãåãã¨ã³ã³ã¼ããã 16 鲿ååãæååã¯æ¬¡ã®æ¡ä»¶ãæºããå¿
è¦ãããã¾ãã
Uint8Array.prototype.setFromBase64()
ã¨ã¯ç°ãªãã¾ãï¼ã16 鲿ååãããã³ã¼ãããããã¤ããå«ã¾ãã¦ããæ°ãã Uint8Array
ãªãã¸ã§ã¯ãã
SyntaxError
å ¥åæååã« 16 鲿å以å¤ã®æåãå«ã¾ãã¦ãããããã®é·ãã奿°ã®å ´åã«çºçãã¾ãã
TypeError
å ¥åæååãæååã§ãªãå ´åã«çºçãã¾ãã
ãã®ä¾ã§ã¯ã16 鲿ååã Uint8Array
ã«ãã³ã¼ããã¦ãã¾ãã
const hexString = "cafed00d";
const bytes = Uint8Array.fromHex(hexString);
console.log(bytes); // Uint8Array [ 202, 254, 208, 13 ]
大æåã対å¿ãã¦ãã¾ãã
const hexString = "CAFEd00d";
const bytes = Uint8Array.fromHex(hexString);
console.log(bytes); // Uint8Array [ 202, 254, 208, 13 ]
仿§æ¸ ãã©ã¦ã¶ã¼ã®äºææ§ é¢é£æ
å ±
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4