How can I compare 2 strings with a fixed length?

string #1 is "bla bla bla"
string #2 is "bla bla bla\bla"
^.........^ <- needs to be checked and should be ok.

string #1 is "bla bla blaa"
string #2 is "bla bla bla\bla"
^..........^ <- should be wrong.. duh

I need to check if string 2 is indentical to string 1 with the length of string 1.

(does this make sense?)

Thanks in advance.