Jethr0x
2010-07-30 14:53:51
How can you check if s1 is in s2?
Example:
String: Hello, how are you?
How do you see if the word "are" is located in the string?
Here is my code, commented out is how you would do it in C…
Example:
String: Hello, how are you?
How do you see if the word "are" is located in the string?
Here is my code, commented out is how you would do it in C…
program PhotobucketAlbumChecker;
const
URL = 'http://s198.photobucket.com/albums/aa286/hellabawm/';
var
albums : TStringArray;
procedure TryAlbum(L : string);
var
str : string;
begin
str := GetPage(L);
str := Between('<title>', '</title>', str);
Writeln(str);
// if str.Contains("Private") {
// Writeln('Private Album: ' + L);
// } else if (str.Contains("Pictures by ") {
// Writeln('Public Album: ' + L);
// }
end;
procedure CheckAlbums(URL: string);
var
i : integer;
link : string;
begin
albums := ['', 'new', 'New', 'NeW', 'NEW']
for i := 0 to (GetArrayLength(albums) - 1) do
begin
link := URL + albums[i];
Writeln('Trying: ' + link);
TryAlbum(link);
end;
end;
begin
ClearDebug;
CheckAlbums(URL);
end.