@lang:str.upper
Convert a string to uppercase.
On-chain (@lang:str.upper!): Maps ASCII letters only; every other byte passes through unchanged.
Returns: string
Syntax
Section titled “Syntax”@lang:str.upper(s)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
s | string | Source string |
See Also
Section titled “See Also”- @str.lower — convert to lowercase
On-chain face (@str.upper!)
Section titled “On-chain face (@str.upper!)”Uppercase the string return of a call on-chain through toUpper:
ASCII letters only, every other byte passes verbatim (UTF-8 safe).
Examples
Section titled “Examples”load lang
set $pool 0x44fA8E6f47987339850636F88629646662444217
assert @str.upper!($pool::{symbol()(string)}) == "WETH"See Also
Section titled “See Also”assert,@str.lower!