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 Software eCommerce / Web Developer Tools http://www.smithmicro.com Associated Messages, from the most recent to the oldest:

    
  1. Re: request for string functions (John Hill 1998)
  2. Re: request for string functions (Brian B. Burton 1998)
  3. request for string functions (Peter Ostry 1998)
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 Software eCommerce / 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:

[WebDNA] RESTART WebDNA (2016) [WebDNA] Successful, working WebDNA7/CentOS install? (2013) Too Much Info (1998) Help Please WebDNA 6 Secure Forms Problem (2004) [WebDNA] Error installing v6.2 on Ubuntu 10.10 ... (2012) Practice runs ? (1997) Running 2 two WebCatalog.acgi's (1996) OLD ORDERS (1998) Great product and great job ! (1997) oops private message leaked into talk list (1997) Some Questions (1997) Missing Cart Information (2003) [SearchString] usage (1997) Don't tick me off :) [elaspedtime] (1997) more info on [setlineitems] (1997) Emailer setup (1997) Searching for a search solution (2000) searching twice on same field (1998) authenticating a second user (1997) Bug or syntax error on my part? (1997)