Technical References - [findstring]

[FindString Source=...&Find=...&MatchCase=...&Reverse=...&StartAt=...]

numero = 181
interpreted = N
texte = You can use the [findstring] global tag to find the location of a sub-string within a given source string. For example
[text]mystring=WebDNA is a powerful, easy to learn, scripting language.[/text][text]found_at=[FindString source=[mystring]&find=powerful][/text][showif [found]>0]Found 'powerful' in source string at character position [found_at][/showif][hideif [found]>0]String 'powerful' not found.[/hideif]
result... Found 'powerful' in source string at character position 13
ParametersDescription 
Source(Required) The character string to search.
Find(Required) The character string to find.
MatchCase(Optional) T/F - Default is 'F'. If set to 'T', the search will be case sensitive.
Reverse(Optional) T/F - Default is 'F'. If set to 'T', the search is performed starting from the end of the 'source' string.
StartAt(Optional) Sets the start position, in the 'source' string, from which to start the search. If not specified, the search will start from the beginning of the 'source' string. If the 'Reverse' parameter is set to 'T', the 'StartAt' position is relative to the end of the 'source' string.
You can use the [findstring] global tag to find the location of a sub-string within a given source string.

For example

[text]mystring=WebDNA is a powerful, easy to learn, scripting language.[/text]
[text]found_at=[FindString source=[mystring]&find=powerful][/text]
[showif [found]>0]
Found 'powerful' in source string at character position [found_at]
[/showif]

[hideif [found]>0]
String 'powerful' not found.
[/hideif]

result...
Found 'powerful' in source string at character position 13

ParametersDescription 
Source(Required) The character string to search.
Find(Required) The character string to find.
MatchCase(Optional) T/F - Default is 'F'. If set to 'T', the search will be case sensitive.
Reverse(Optional) T/F - Default is 'F'. If set to 'T', the search is performed starting from the end of the 'source' string.
StartAt(Optional) Sets the start position, in the 'source' string, from which to start the search. If not specified, the search will start from the beginning of the 'source' string. If the 'Reverse' parameter is set to 'T', the 'StartAt' position is relative to the end of the 'source' string.

DOWNLOAD WEBDNA NOW!

Top Articles:

Download WebDNA Applications

WebDNA applications...

Technical Change History

This Technical Change History provides a reverse chronological list of WebDNA changes...

WebDNA reference

...

Tips and Tricks

A list of user-submitted tips ...

F.A.Q

A compilation of some user's questions...

WebDNA Libraries

A list of available libraries for WebDNA...

Related Readings:

[password]

Using [password] and [username] is an easy was to show the browser login dialog box...

[writefile]

[writefile] functions allows you to perform a wide variety of tasks...

[unurl]

Changes text from URL-compatible characters to plain text...

[removelineitem]

...

[JSONstore]

[JSONstore] stores a multidimentional JSON object into a WebDNA database...

[listfields]

Lists all the fields in the specified database...