Skip to content

Conversation

@flashultra
Copy link
Contributor

Since Haxe 5 it is possible to initialize a value like var i = 0b100000000000000001; (similar to hex var i = 0x10001;).
Currently, StringTools.hex exists, but there is no similar function for binary representation.
This pull request adds StringTools.binary(...)

@skial skial mentioned this pull request Jul 29, 2025
1 task
@kLabz
Copy link
Contributor

kLabz commented Nov 17, 2025

@Simn got anything against this?

@Simn
Copy link
Member

Simn commented Nov 17, 2025

Isn't StringTools usually used as a static extension? That would make this a little weird... but I don't know where functions like this typically go.

@kLabz
Copy link
Contributor

kLabz commented Nov 18, 2025

Well there's StringTools.hex there too, so I guess that's where functions like this went until now, at least :/

I agree that it's weird to see functions with Int first argument in a module meant for static extensions on String...

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.

3 participants