刘凡 9ff4d1d109 add S3,archive,truncate há 2 anos atrás
..
LICENSE 9ff4d1d109 add S3,archive,truncate há 2 anos atrás
README.md 9ff4d1d109 add S3,archive,truncate há 2 anos atrás
smartTruncate_python.py 9ff4d1d109 add S3,archive,truncate há 2 anos atrás

README.md

smartTruncate

Truncate a string without cutting a sentence in the middle.

Syntax: smartTruncate(content, begin=0, length=100, addSuffix=False, suffix=' ...', addPrefix=False, prefix='... ')

Returns dictionary object of the modified string 'result'

If the string was cut, the returned dictionary includes the key 'trimmed_at_index' where it was cut