Changeset 35150 in project


Ignore:
Timestamp:
02/18/18 07:42:26 (4 months ago)
Author:
kon
Message:

trim before checking truth

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/posix-utils/trunk/posix-utils.scm

    r35149 r35150  
    2424  (only posix process process-wait)
    2525  (only utils read-all)
    26   (only (srfi 13) string-index string-take string-null?)
     26  (only (srfi 13) string-trim-both string-index string-take string-null?)
    2727  (only (srfi 14) list->char-set) )
    2828
     
    6868(: environment-variable-true? (string -> boolean))
    6969(define (environment-variable-true? varnam)
    70   (and-let* ((varval (environment-variable-bound? varnam)))
     70  (and-let* (
     71    (varval (environment-variable-bound? varnam))
     72    (varval (string-trim-both varval))
     73    ((not (string-null? varval))) )
    7174    (let ((1stch (string-ref varval 0)))
    7275      (case 1stch
Note: See TracChangeset for help on using the changeset viewer.