~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Robert Collins
  • Date: 2005-10-15 11:38:29 UTC
  • mfrom: (1185.16.40)
  • Revision ID: robertc@lifelesslap.robertcollins.net-20051015113829-40226233fb246920
mergeĀ fromĀ martin

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
import os
25
25
import re
26
26
import sha
 
27
import string
27
28
import sys
28
29
import time
29
30
import types
418
419
        return True
419
420
    else:
420
421
        return False
 
422
        
 
423
 
 
424
def contains_whitespace(s):
 
425
    """True if there are any whitespace characters in s."""
 
426
    for ch in string.whitespace:
 
427
        if ch in s:
 
428
            return True
 
429
    else:
 
430
        return False
 
431
 
 
432
 
 
433
def contains_linebreaks(s):
 
434
    """True if there is any vertical whitespace in s."""
 
435
    for ch in '\f\n\r':
 
436
        if ch in s:
 
437
            return True
 
438
    else:
 
439
        return False