diff --git a/.gitignore/error correction b/.gitignore/error correction index 195f10a..c76c688 100644 --- a/.gitignore/error correction +++ b/.gitignore/error correction @@ -18,4 +18,17 @@ def string2bin(string): return stringList def segmentString(string, fill): - + desiredWidth = 8 + s1 = [] + if len(string) <= 8: + while len(string) < desiredWidth: + string += fill + s1.append(string) + return s1 + else: + s1.append(string[0:8]) + s2 = string[8:] + while len(s2) < desiredWidth: + s2 += fill + s1.append(s2) + return s1