dond.pp 916 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {
  2. This file is part of the Free Component Library
  3. Copyright (c) 2022 by Michael Van Canneyt, [email protected]
  4. Tool to lowercase values in a Name=Value lisst.
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {$mode objfpc}
  12. {$h+}
  13. uses sysutils, classes;
  14. Var
  15. I : Integer;
  16. N,V : String;
  17. begin
  18. With TStringList.Create do
  19. try
  20. LoadFromFile(ParamStr(1));
  21. For I:=0 to Count-1 do
  22. begin
  23. GetNameValue(i,N,V);
  24. V:=LowerCase(V);
  25. Strings[i]:=N+'='+V;
  26. end;
  27. SaveToFile(ParamStr(1));
  28. Finally
  29. Free;
  30. end;
  31. end.