home *** CD-ROM | disk | FTP | other *** search
- {
- [Scriptsettings]
- Scriptname=PHP singleline comment
- ExecuteOnStartup=0
- ExecuteOnlyOnce=0
- }
- program PHPSingleLineComment;
-
- function CommentIt(s: string) : string;
- var
- TempList: TStringList;
- Temp: string;
- i: integer;
- begin
- Temp := '';
- TempList := TStringList.Create;
- TempList.Text := s;
- for i := 0 to TempList.Count - 1 do
- begin
- if TempList.Strings[i] <> '' then
- Temp := Temp + '//'+TempList.Strings[i];
- Temp := Temp + #13#10;
- end;
- TempList.Free;
- Result := Temp;
- end;
-
- var
- Code: string;
- begin
- If Editor.SelText <> '' then
- Editor.SelText := CommentIt(Editor.SelText);
- end;
-