mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 13:21:25 -07:00
Making the switch to v2
This commit is contained in:
parent
8cf4452d48
commit
ce3ef7f4c1
486 changed files with 7948 additions and 9070 deletions
|
@ -1,18 +0,0 @@
|
|||
def isprintable(instring):
|
||||
if isinstance(instring, str):
|
||||
#http://stackoverflow.com/a/3637294
|
||||
import string
|
||||
printset = set(string.printable)
|
||||
isprintable = set(instring).issubset(printset)
|
||||
return isprintable
|
||||
else:
|
||||
return True
|
||||
|
||||
def count_newlines_from_end(str):
|
||||
i = len(str)
|
||||
while i > 0:
|
||||
if str[i-1] != '\n':
|
||||
break
|
||||
i -= 1
|
||||
return len(str) - i
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue