#str

2 posts · Last used 13d

Back to Timeline
MariaCalendula
@MariaCalendula@mementomori.social · May 04, 2026
Kai siihenkin on ihan syy miksi läppärin näppäimistö on kiinni kiljoonalla ruuvilla. Sain näppiksen vauhdettua. Se toimii. Touchpad taas ei. 😆 #strömsö
0
0
0
In reply to
gim
@gim@queer.group · Apr 28, 2026
Example: #let padInt(number, targetLen) = { if number >= calc.pow(10, targetLen) [ #str(number) ] else { let n = targetLen let r = number while n > 0 { n = n - 1 let p = calc.pow(10, n) let c = calc.floor(r / p) r = r - (c * p) str(c) } } } There's no function to left pad zeros to an int (or other number types). There isn't a function to cut off decimals either...
0
0
0

You've seen all posts