diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-08-24 12:52:49 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-08-24 12:52:49 +0200 |
commit | a64f038d58adcef99ba1fc8700de453405d87f3f (patch) | |
tree | 37b39ce0f4ab7a6706e5c2e09859d66f723f606c /src/corelib/fpg_utils.pas | |
parent | ed0277d9646401fbef68a8980b9021915b392032 (diff) | |
download | fpGUI-a64f038d58adcef99ba1fc8700de453405d87f3f.tar.xz |
New wrapper (fpgChangeFileExt) created for fpGUI.
This handles the OS encoding correctly, like the other wrapper
functions.
Diffstat (limited to 'src/corelib/fpg_utils.pas')
-rw-r--r-- | src/corelib/fpg_utils.pas | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/fpg_utils.pas b/src/corelib/fpg_utils.pas index 107fb262..a53c7efe 100644 --- a/src/corelib/fpg_utils.pas +++ b/src/corelib/fpg_utils.pas @@ -58,6 +58,7 @@ function fpgExtractFilePath(const FileName: TfpgString): TfpgString; function fpgExtractFileName(const FileName: TfpgString): TfpgString; function fpgExtractFileExt(const FileName: TfpgString): TfpgString; function fpgForceDirectories(const ADirectory: TfpgString): Boolean; +function fpgChangeFileExt(const FileName, Extension: TfpgString): TfpgString; implementation @@ -151,6 +152,11 @@ begin Result := ForceDirectories(fpgToOSEncoding(ADirectory)); end; +function fpgChangeFileExt(const FileName, Extension: TfpgString): TfpgString; +begin + Result := ChangeFileExt(fpgToOSEncoding(Filename), Extension); +end; + function fpgAppendPathDelim(const Path: TfpgString): TfpgString; begin if (Path <> '') and (Path[length(Path)] <> PathDelim) then |