ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / String functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
StringDelete (Function)
In french: ChaîneSupprime
Deletes:
  • all the occurrences of a substring within a string.
  • part of a string within another string. The part of the string to remove is identified by its position and length.
Example
MyString = StringDelete("Antananarivo", "a")
// MyString = Antnnrivo
WEBDEV - Browser codeWindowsLinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystJava
MyString = StringDelete("Antananarivo", 4, 1)
// MyString  = "Antnanarivo"
 
MyString1 = StringDelete("Example of sentence to delete", 8, 12)
// MyString1 = "Example to delete"
Syntax

Deleting all the occurrences of a substring in a string Hide the details

<Result> = StringDelete(<Initial string> , <Substring> [, <Options>])
<Result>: Ansi, Unicode or Binary string
String resulting from the deletion of the substrings.
<Initial string>: Ansi, Unicode or Binary string
Initial string to use. This character string is not modified.
<Substring>: Character string or array of Ansi, Unicode or Binary characters
Substring that will be deleted from <String>. This string can correspond to:
  • a character string.
  • an array of character strings. In this case, all the substrings are deleted from <String>.
<Options>: Optional Integer constant
Mode used to find the substring:
IgnoreCaseCase and accent insensitive search (ignores uppercase/lowercase differences).
WholeWordSearches for a whole word (between punctuation characters or spaces).

By default, the search is case sensitive and it searches for all specified strings (even if they are part of a word).
WEBDEV - Browser codeReports and QueriesWindowsLinuxUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystJavaUser code (UMC)Ajax

Deleting part of a string identified by its position and length Hide the details

<Result> = StringDelete(<Initial string> , <Position> , <Length>)
<Result>: Character string
String resulting from the deletion of a part of the string.
<Initial string>: Character string
Initial string to use (maximum size: 2 GB). This character string is not modified.
<Position>: Integer
Position of the part of the string to delete.
<Length>: Integer
Length of the part of the string to delete (in number of characters).
Business / UI classification: Neutral code
Component: wd290vm.dll
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help