Skip to content

String.fromCharCode: accept hex string argument for icon font codes#904

Open
davidhealey wants to merge 1 commit intochristophhart:developfrom
davidhealey:fixIconFontConcat
Open

String.fromCharCode: accept hex string argument for icon font codes#904
davidhealey wants to merge 1 commit intochristophhart:developfrom
davidhealey:fixIconFontConcat

Conversation

@davidhealey
Copy link
Copy Markdown
Contributor

Allows storing icon font character codes as hex strings (e.g. "e272") and converting them to unicode characters at runtime via String.fromCharCode("e272"), in addition to the existing integer form.

This enables patterns like:
const Icons = { play: "e272" };
local icon = String.fromCharCode(Icons.play);

Integer arguments (0xe272, 58994) are unchanged - fully backwards compatible.

https://claude.ai/code/session_01UiAHB42HtFriHbJ9q5Lp4u

Allows storing icon font character codes as hex strings (e.g. "e272")
and converting them to unicode characters at runtime via
String.fromCharCode("e272"), in addition to the existing integer form.

This enables patterns like:
  const Icons = { play: "e272" };
  local icon = String.fromCharCode(Icons.play);

Integer arguments (0xe272, 58994) are unchanged - fully backwards compatible.

https://claude.ai/code/session_01UiAHB42HtFriHbJ9q5Lp4u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants