Macro soroban_sdk::symbol_short
source · symbol_short!() { /* proc-macro */ }
Expand description
Create a short Symbol constant with the given string.
A short symbol’s maximum length is 9 characters. For longer symbols, use Symbol::new to create the symbol at runtime.
Valid characters are a-zA-Z0-9_
.
The Symbol is generated at compile time and returned as a const.
Examples
use soroban_sdk::{symbol_short, Symbol};
let symbol = symbol_short!("a_str");
assert_eq!(symbol, symbol_short!("a_str"));