]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Remove unused function nlcount.
authorBruno Haible <bruno@clisp.org>
Sat, 9 Sep 2017 10:27:40 +0000 (12:27 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 9 Sep 2017 14:42:26 +0000 (16:42 +0200)
pygnulib/constants.py

index 9428e1fce6f0311d4a753a5d6682f13663e007d9..61d86a219235c690cd6fe72066d53c508543b2ee 100644 (file)
@@ -437,20 +437,4 @@ def nlremove(text):
     return(text)
 
 
-def nlcount(text):
-    '''Return count of newlines before and after text.'''
-    counter = int()
-    before = int()
-    after = int()
-    text = text.replace('\r\n', '\n')
-    while text[counter] == '\n':
-        before += 1
-        counter += 1
-    counter = len(text) - 1
-    while text[counter] == '\n':
-        after += 1
-        counter -= 1
-    print(before, after)
-
-
 __all__ += ['APP', 'DIRS', 'MODES', 'UTILS']