Re: request for string functions
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 17567
interpreted = N
texte = I agree that a more powerful string handling ability would be nice (something that goes beyond what you are suggesting). You can create WebDNA include files that perform all the functions you mentioned right now. In general, each include file would use a skeleton like this:[include file=findchars.inc&the_field=[myfield]&find=Hello]--[math show=f]the_len=[countchars][the_field][/countchars][/math][math show=f]found=0[/math][loop start=1&end=[math]the_len[/math]][showif [url][find][/url]=[url][getchars start=[index]&end=[math][index]+the_len-1[/math]][the_field][/getchars][/url]][math]found=[index][/math][/showif][/loop]John.P.S. If someone wants to test and finish these sample they would be GREAT snippets.>(Brian)>>Some examples of email addresses that it stopped on:>> ESTUCIA@.IX.NETCOM.COM>> GARJ 5409@aol.com>> bdunn@ewu>> aol.pizzagarib.com>>At this point I want to line out once more:>To reduce errors in mail addresses it is required to check the user input>as accurate as possible. Please, we really nee more sophisticated string>functions in WebCat to check user input like email address more easy.>>A suggestion - with the following additional functions WebCat could handle>nearly all situations:>----------> [FINDSTRING source=[MyString]&find=hello] -> number> returns the starting position of hello in the variable [MyString]>----------> [INSERTSTRING source=[MyString]&insert=hello&start=15]> Inserts hello into the variable [MyString] at position 15>----------> [DELETESTRING source=[MyString]&start=15&end=20]> deletes characters 15 to 20 from variable [MyString]>----------> [REPLACESTRING source=[MyString]&oldstring=hello&newstring=welcome]> replaces all occurences of hello with welcome> it should be possible to set newstring to (= nothing)>---------->>Peter>>__________________________________________>Peter Ostry - po@ostry.com - www.ostry.com>Ostry & Partner - Ostry Internet Solutions>Auhofstrasse 29 A-1130 Vienna Austria>fon ++43-1-8777454 fax ++43-1-8777454-21 John A. Hill, V.P. Marketing Pacific Coast SoftwareeCommerce / Web Developer Tools http://www.smithmicro.com
Associated Messages, from the most recent to the oldest:
I agree that a more powerful string handling ability would be nice (something that goes beyond what you are suggesting). You can create WebDNA include files that perform all the functions you mentioned right now. In general, each include file would use a skeleton like this:[include file=findchars.inc&the_field=[myfield]&find=Hello]--[math show=f]the_len=
[countchars][the_field][/countchars][/math][math show=f]found=0[/math][loop start=1&end=
[math]the_len[/math]][showif
[url][find][/url]=
[url][getchars start=[index]&end=
[math][index]+the_len-1[/math]][the_field][/getchars][/url]]
[math]found=[index][/math][/showif][/loop]John.P.S. If someone wants to test and finish these sample they would be GREAT snippets.>(Brian)>>Some examples of email addresses that it stopped on:>> ESTUCIA@.IX.NETCOM.COM>> GARJ 5409@aol.com>> bdunn@ewu>> aol.pizzagarib.com>>At this point I want to line out once more:>To reduce errors in mail addresses it is required to check the user input>as accurate as possible. Please, we really nee more sophisticated string>functions in WebCat to check user input like email address more easy.>>A suggestion - with the following additional functions WebCat could handle>nearly all situations:>----------> [FINDSTRING source=[MyString]&find=hello] -> number> returns the starting position of hello in the variable [MyString]>----------> [INSERTSTRING source=[MyString]&insert=hello&start=15]> Inserts hello into the variable [MyString] at position 15>----------> [DELETESTRING source=[MyString]&start=15&end=20]> deletes characters 15 to 20 from variable [MyString]>----------> [REPLACESTRING source=[MyString]&oldstring=hello&newstring=welcome]> replaces all occurences of hello with welcome> it should be possible to set newstring to (= nothing)>---------->>Peter>>__________________________________________>Peter Ostry - po@ostry.com - www.ostry.com>Ostry & Partner - Ostry Internet Solutions>Auhofstrasse 29 A-1130 Vienna Austria>fon ++43-1-8777454 fax ++43-1-8777454-21 John A. Hill, V.P. Marketing Pacific Coast SoftwareeCommerce / Web Developer Tools http://www.smithmicro.com
John Hill
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Date Calulation (1997)
[carts] and databases (1997)
New command suggestion (was Modifying databases manually) (1997)
Emailer (WebCat2) (1997)
Dummy Credit Card Number for debug? (1997)
Webten + Webcat running smooth (1998)
hideif [x]=1,2,3.. (2003)
Emailer or [sendmail] questions ... (1998)
dreamweaver mx (2002)
SMTP Mail Server (2003)
Serving images from databases (1998)
month or year in date field in lineitems continued... (1998)
Problems setting MIME Headers (1998)
can WC render sites out? (1997)
OT: visudo help (2003)
Webcatalog Conference? (1998)
Major Security Hole IIS NT (1998)
Pay Flow Pro error (2002)
RE: shrink-wrapped version out yet? (1997)
form data submission gets truncated (1997)