Skip to content

Allow spaces in the hex string format #7290

@axic

Description

@axic

Currently hex strings (bytes tmp = hex"001122";) cannot have spaces in them.

I am writing a contract right now which has quite a large hex string (237 bytes) with clearly separate parts. Splitting that with spaces would allow easier visual identification and comparison of the parts.

E.g. bytes tmp = hex"00 11 22"; would be equivalent to the above.

I'd only allow spaces between hex bytes (and not nibbles) and would disallow trailing or leading spaces.

An alternative solutions is to allow underscore instead of space with a similar strictness how underscores are allowed in number literals.

Metadata

Metadata

Assignees

Labels

language design :rage4:Any changes to the language, e.g. new features

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions