I have two things I am trying to compare, both strings.

What I want to know is if string a is the beginning of string b.

Example (pseudo code)

string a = this
string b = that
string c = thisandthat

a... == c #t
b... == c #f

Hope I am making sense here.  I couldn't figure out a way so at present my 
program does this

(define alen (length astr))
(define bpart (substring bstr 0 alen))
(cond
  [(string=? astr bpart) #t]
  [else #f])

That is working, but it seems like there should be a simpler solution to this.

Ken

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to