~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 23:27:44 UTC
  • mfrom: (1456)
  • mto: This revision was merged to the branch mainline in revision 1457.
  • Revision ID: robertc@lifelesslap.robertcollins.net-20051015232744-be395943ade852d4
merge from integration

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