'Breaks text to <=chunk_size long chunks. Tries to do this at a space.
All chunks, except for last, end with suffix.
All chunks, except for first, start with prefix.'

@staticmethod
def _break_to_chunks(text, chunk_size=TWITTER_MAX_CHARS, suffix=TWITTER_HAS_NEXT_SUFFIX, prefix=TWITTER_HAS_PREV_PREFIX):

    from s3 import s3_str
    res = []
    current_prefix = ''
    while text:
        if (len((current_prefix + text)) <= chunk_size):
            res.append((current_prefix + text))
            return res
        else:
            c = text[:((chunk_size - len(current_prefix)) - len(suffix))]
            i = c.rfind('    ')
            if (i > 0):
                c = c[:i]
            text = text[len(c):].lstrip()
            res.append(((current_prefix + c.rstrip()) + s3_str(suffix)))
            current_prefix = s3_str(prefix)
