1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39:
| function replace(value: string; find_string, replace_by: string): string; var i: integer; begin repeat i := pos(find_string, value); if i>0 then begin delete(value, i, length(find_string)); if replace_by <> '' then insert(replace_by, value, i); end; until pos(find_string, value) = 0; result := value; end;
function text_in(str: string): string; begin str := replace(str, #148, #246); str := replace(str, #153, #214); str := replace(str, #132, #228); str := replace(str, #142, #196); str := replace(str, #129, #252); str := replace(str, #154, #220); str := replace(str, #225, #223); result := str; end;
function text_out(str: string): string; begin str := replace(str, #246, #148); str := replace(str, #214, #153); str := replace(str, #228, #132); str := replace(str, #196, #142); str := replace(str, #252, #129); str := replace(str, #220, #154); str := replace(str, #223, #225); result := str; end; |