You need to write a subroutine for that.
You can look at:
That being said, in the specific case where the integer is an application argument, I would strongly recommend you to instead encode the integer following:
Store an int in key local variable - #2 by fabrice (in smart contract)
Save price/amount in contract - sdk js - #2 by fabrice (for encoding in the SDK)
This is much more compact and much less error-prone.
Decimal strings representing integers (like “123456”) should only be used for human-readable values (e.g., in Log
) or in cases where you really have no choice of encoding (e.g., if you get a signed decimal integer).