You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
197 B

package misc
func LFill(num string, bit int) string {
if len(num) >= bit {
return num
} else {
more := ""
for i := 0; i < bit-len(num); i++ {
more += "0"
}
return more + num
}
}