remove second truncateWords function
This commit is contained in:
parent
c66787785f
commit
c4e1bb311e
1 changed files with 0 additions and 10 deletions
10
ox/text.py
10
ox/text.py
|
@ -151,16 +151,6 @@ def trimString(string, num):
|
|||
string = string[:num - 13] + '...' + string[-10:]
|
||||
return string
|
||||
|
||||
def truncateWords(s, num):
|
||||
"Truncates a string after a certain number of words."
|
||||
length = int(num)
|
||||
words = s.split()
|
||||
if len(words) > length:
|
||||
words = words[:length]
|
||||
if not words[-1].endswith('...'):
|
||||
words.append('...')
|
||||
return ' '.join(words)
|
||||
|
||||
def getValidFilename(s):
|
||||
"""
|
||||
Returns the given string converted to a string that can be used for a clean
|
||||
|
|
Loading…
Reference in a new issue