PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Spaces
  • CompleteDir and UNICODE
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Adds a directory separator ("\" or "/" according to the runtime platform) to the end of a string, if necessary.
This function is useful for building full file names when the path format is unknown (e.g., if the user types a file path).
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
WINDEVJavaUser code (UMC)
Res = CompleteDir(FilePath) + "Document.Doc"
Res = CompleteDir("c:\temp")           // Returns "c:\temp\"
Res = CompleteDir("c:\temp\")          // Returns "c:\temp\"
Res = CompleteDir("\CCS\\Dir2\user\")  // Returns "\CCS\\Dir2\user\"
Res = CompleteDir("")                  // Returns ""
WINDEVLinux
Res = CompleteDir(" /root/file ")      // Returns "/root/file/"
Res = CompleteDir("")                  // Returns ""
Syntax
<Result> = CompleteDir(<String to check>)
<Result>: Character string
  • String that ends in a directory separator.
  • Empty string if <String to check> corresponds to an empty string ("").
<String to check>: Character string (with quotes)
String to check and complete, if necessary. This character string is not modified.
Remarks

Spaces

Caution: The leading and trailing spaces in <String to check> are removed (identical to NoSpace).

CompleteDir and UNICODE

If the string passed as a parameter is an ANSI string, the result will be an ANSI string.
If the string passed as a parameter is a UNICODE string, the result will be a UNICODE string.
Remark: If the result of CompleteDir on an ANSI string is assigned to a UNICODE string (and vice versa), the conversion will be implicitly performed.
For more details, see Managing UNICODE.
Related Examples:
Handling text files Unit examples (WINDEV): Handling text files
[ + ] Handling "text" files with WINDEV:
- Create a text file
- Write into a text file
- Read in a text file
Handling text files Unit examples (WEBDEV): Handling text files
[ + ] This example explains how to handle "non HFSQL" files with WEBDEV and it allows you to:
- Create a text file
- Write into a text file
- Read in a text file
Handling text files Unit examples (WINDEV Mobile): Handling text files
[ + ] Handling external "text" files:
- Create a text file
- Write into a text file
- Read in a text file
Component: wd260vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment