PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Characters taken into account for the punctuation and the spaces
  • StringEndsWith 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
Checks whether a character string ends:
  • with a specific character string.
  • with one of the character strings found in a list.
Versions 16 and later
PHP This function is now available for the PHP sites.
New in version 16
PHP This function is now available for the PHP sites.
PHP This function is now available for the PHP sites.
Versions 17 and later
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
New in version 17
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 20 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 20
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
String1 = "Specify the action of the procedure"
String2 = "Procedure"
IF StringEndsWith(String1, String2, ccIgnoreCase) <> 9 THEN
Trace("The Procedure word is not found at the end of the string")
END
Syntax

Checking whether a character string ends with another string Hide the details

<Result> = StringEndsWith(<Initial String> , <Sought String> [, <Search Options>])
<Result>: Integer
  • Size of the corresponding element in the initial string,
  • 0 if <Initial String> does not end with <Sought String>.
<Initial String>: Character string (with quotes)
String to compare.
<Sought String>: Character string (with quotes)
String that must be compared to the end of <Initial String>.
<Search Options>: Optional Integer constant (combination of constants)
Options used for the search:
ccNormal
(Default value)
Standard comparison, similar to the operator '='.
ccIgnoreAccentComparison while ignoring the accented characters.
ccIgnoreCaseComparison while ignoring the case (uppercase/lowercase characters)
ccIgnoreSpaceComparison while ignoring the space characters found before and after the character strings to compare.
Versions 20 and later
ccIgnoreInsideSpace
New in version 20
ccIgnoreInsideSpace
ccIgnoreInsideSpace
Comparison while ignoring the space characters found inside the character strings to compare.
AndroidAndroid Widget JavaPHP This constant is not available.
ccIgnorePonctuationAndSpaceComparison while ignoring the punctuation and the space characters (see the Notes for more details).
Universal Windows 10 App Not available in Windows Phone

Checking whether a character string ends with one of the strings found in the list Hide the details

<Result> = StringEndsWith(<Initial String> , <List of Sought Strings> [, <Search Options>])
<Result>: Integer
  • Size of the corresponding element,
  • 0 if <Initial String> does not end with one of the elements of <List of Sought Strings>.
<Initial String>: Character string (with quotes)
String to compare.
<List of Sought Strings>: Character string, array, ...
List of elements that must be compared to the end of <Initial String>. This parameter can correspond to:
  • a simple character string,
  • a character string variable,
  • an array of character strings (in the following format: ["string1", "string2", "string3"]
  • an "array of character strings" variable.
<Search Options>: Optional integer
Options used for the search:
ccNormal
(Default value)
Standard comparison, similar to the operator '='.
ccIgnoreAccentComparison while ignoring the accented characters.
ccIgnoreCaseComparison while ignoring the case (uppercase/lowercase characters)
ccIgnoreSpaceComparison while ignoring the space characters found before and after the character strings to compare
Versions 20 and later
ccIgnoreInsideSpace
New in version 20
ccIgnoreInsideSpace
ccIgnoreInsideSpace
Comparison while ignoring the space characters found inside the character strings to compare.
AndroidAndroid Widget JavaPHP This constant is not available.
ccIgnorePonctuationAndSpaceComparison while ignoring the punctuation and the space characters (see the Notes for more details).
Remarks

Characters taken into account for the punctuation and the spaces

The characters taken into account for the punctuation and the spaces are supplied by the system. To get the list of these characters, write the following WLanguage code:
s is string
FOR i = 0 TO 255
IF Charact(i) <> StringFormat(Charact(i), ccIgnorePunctuationAndSpace) THEN
 s += Charact(i)
END
END
Info(s)
ToClipboard(s)

StringEndsWith and UNICODE

You have the ability to use ANSI strings, Unicode strings and buffers in the different parameters of the function.
The following conversion rule is used for the Ansi systems (Windows or Linux):
  • It at least one of the strings is a buffer, all the strings are converted into buffers and the operation is performed with buffers,
  • If the first condition is not fulfilled, if at least one of the strings in in Unicode format, all the strings are converted into Unicode and the operation is performed in Unicode (the conversion is performed with the current character set if necessary)
  • Otherwise, the operation is performed in Ansi.
The following conversion rule is used for the Unicode systems (Windows CE):
  • It at least one of the strings is a buffer, all the strings are converted into buffers and the operation is performed with buffers,
  • Otherwise, the operation is performed in Unicode.
See Managing the UNICODE format for more details.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment