RosettaCodeData/Task/String-matching/Aime/string-matching.aime

23 lines
524 B
Plaintext

text t;
data b;
b = "Bangkok";
t = "Bang";
o_form("starts with, embeds, ends with \"~\": ~, ~, ~\n", t, b.seek(t) == 0,
b.seek(t) != -1,
b.seek(t) != -1 && b.seek(t) + ~t == ~b);
t = "ok";
o_form("starts with, embeds, ends with \"~\": ~, ~, ~\n", t, b.seek(t) == 0,
b.seek(t) != -1,
b.seek(t) != -1 && b.seek(t) + ~t == ~b);
t = "Summer";
o_form("starts with, embeds, ends with \"~\": ~, ~, ~\n", t, b.seek(t) == 0,
b.seek(t) != -1,
b.seek(t) != -1 && b.seek(t) + ~t == ~b);