String replace, getParam 함수
procedure replace(var source : string; find, repl : string); var ind : integer; begin ind := pos(find, source); if ind > 0 then begin source := copy(source, 1, ind-1) + repl + copy(source, ind + length(find), 10000); replace(source, find, repl); end end; 사용법은 replace(str,'메롱','하이'); ShowMessage(str); function GetParam(str : string; index : integer) : string; var i, count : integer; tmp : string;..
2008. 8. 13.
richedit 마지막 빈줄 없애기~
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls; type TRichEdit = class(ComCtrls.TRichEdit) //ComCtrls의 RichEdit를 상속 Public procedure AddLast(S: string); end; TForm1 = class(TForm) RichEdit1: TRichEdit; //ComCtrls에서 정의한 RichEdit가 아니고 위에서 정의한 RichEdit가 되겠습니다. Button1: TButton; procedure Button1Click(Sender: TObject)..
2008. 8. 13.