- Joined
- Apr 13, 2008
- Messages
- 1,608
Is there a SubString-like function just for Integers?
Hi, I was looking for a method to get the xth digit of an integer but I couldn't find a solution.
Is there a way to do this with an already implemented function or something?
I created a tiny function for myself, but I don't want to litter my map with unnecessary stuff.
Hi, I was looking for a method to get the xth digit of an integer but I couldn't find a solution.
Is there a way to do this with an already implemented function or something?
I created a tiny function for myself, but I don't want to litter my map with unnecessary stuff.
JASS:
function SubInt takes integer source, integer start, integer end returns integer
return S2I(SubString(I2S(source), start, end))
endfunction