splitInChunks

emlib.textlib.splitInChunks(s, maxlen)[source]

Split s into strings of max. size maxlen

Parameters:
  • s (str | bytes) – the str/bytes to split

  • maxlen (int) – the max. length of each substring

Return type:

list

Returns:

a list of substrings, where each substring has a max. length of maxlen