use core::to_byte_array::FormatAsByteArray;
/// Converts a `felt252` to a `base16` (hexadecimal) string without padding, but including the `0x`
/// prefix.
/// We need this because Starknet Foundry has a way of representing addresses and selectors that
/// does not include 0's after `Ox`.
pub fn to_base_16_string_no_padding(value: felt252) -> ByteArray {
let string = value.format_as_byte_array(16);
format!("0x{}", str<caret>ing)
}
currently it shows:
while it should not show anything (easier solution) or show proper hover for a variable
Empty project, just the following Cairo snippet:
currently it shows:
while it should not show anything (easier solution) or show proper hover for a variable
another example: