Toyo, nadam se da se ne ljutiš, malo sam izmenio tvoju f-ju:
Code:
function Zamena2(s:String): String;
const
Duzina = 3;
C: array[1..Duzina] of Char = ('a','b','c');
Z: array[1..Duzina] of String =('nesto', 'neko', 'bilo sta');
var
i, j: Integer;
cc: string;
begin
for i := 1 to length(s) do
begin
cc := s[i];
for j := 1 to Duzina do
if c[j] = s[i] then cc := z[j];
result := result + cc;
end;
end;
Malo elegantnije rešenje...
ss.
When something is hard to do, then it's not worth doing.