Hola.
Es correcto
BDWONG
Otras alternativas:
Código Delphi
[-]
function foo(const s: string): string;
begin
if s[1]+s[2] = '//' then
Result := 'Hola'
else
Result := 'Adios';
end;
Código Delphi
[-]
function foo(const s: string): string;
begin
if Copy(s, 1, 2) = '//' then
Result := 'Hola'
else
Result := 'Adios';
end;
Saludos