diff options
Diffstat (limited to 'libbe/util/utility.py')
-rw-r--r-- | libbe/util/utility.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libbe/util/utility.py b/libbe/util/utility.py index f954422..779eaa5 100644 --- a/libbe/util/utility.py +++ b/libbe/util/utility.py @@ -147,5 +147,14 @@ def iterable_full_of_strings(value, alternative=None): return False return True +def underlined(instring): + """Produces a version of a string that is underlined with '=' + + >>> underlined("Underlined String") + 'Underlined String\\n=================' + """ + + return "%s\n%s" % (instring, "="*len(instring)) + if libbe.TESTING == True: suite = doctest.DocTestSuite() |