The most powerful tool available is the concept “text item delimiters”, and this is your lucky day, since it was published recently a great introductory article just here:
http://macscripter.net/unscripted/unscripted.php?id=32_0_1_0_C
About your current question, you already pointed the most usual method to compare strings:
bob = "/"
bob is equal to "/"
But in a repeat loop, the value assigned to a string, is not the string itself, but a reference to such string. Eg:
repeat with x in "hello"
if x = "e" then beep
end repeat
Teorically, you should hear a “beep” in the second round, but you won’t, since the value of x will be:
x's first round --> item 1 of "hello"
x's second round --> item 2 of "hello"
...
So, you need anything such as:
repeat with x in "hello"
if x as string = "e" then beep
end repeat
But this isn’t really reliable, since AppleScript, by default, ignores the case of the strings. So, you will beep here too:
repeat with x in "hello"
if x as string = "E" then beep
end repeat
Then, you’d need this:
considering case
repeat with x in "hello"
if x as string = "E" then beep
end repeat
end considering
Ffffff… Anyway, I allways prefer the following method (offset of), since it will work without additional problems:
repeat with x in "hello"
if (offset of x in "e") is not equal to 0 then beep
end repeat
To break a string into paragraphs (no lines), you can use this:
set theString to "this is some sample
test and my mother is
not superman"
set stringParagraphs to paragraphs of theString
--> {"this is some sample", "test and my mother is", "not superman"}
The keyword “paragraph” will break a test using both CR and LF (asciis 13 & 10). If you need a different separator, you can use text item delimiters:
set theString to "this is a sample"
set AppleScript's text item delimiters to "i"
set theString to theString's text items
set AppleScript's text item delimiters to {""}
--> this is its default value, and for safety's sake, we allways restore it
theString --> {"th", "s ", "s a sample"}
More info, see the AppleScript Language Guide (you will find a quick link here: http://www.macscripter.net/ ). It’s a bit old, for most of it will work forever, specially text handling…