Re: [trim]?!

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 56471
interpreted = N
texte = On Mon, 1 Mar 2004, WebDna @ Inkblot Media wrote: > If you are running webcat 5 the getchars has a trim. i'm not.. thanks... > > > ----- Original Message ----- > From: "Kalin Mintchev" > To: "WebDNA Talk" > Sent: Monday, March 01, 2004 6:26 PM > Subject: Re: [trim]?! > > > > > > > > oh, i see now the $... didn't know thw webDNA grep is like the 'real' > > grep... sorry.... > > > > > > On Mon, 1 Mar 2004, Kalin Mintchev wrote: > > > > > > > > > > > thanks... grep is great but replaces ALL the spaces - the problem is > when > > > they use names with spaces in them... like 'Mary Jo', or 'Mary Ann' > etc.. > > > i.e.: > > > if i have: > > > > > > [text]name=mary jo [/text] > > > > > > [trim][name][/trim] should produce 'mary jo' > > > > > > wheres [grep search= $&replace=][name][/grep] will produce 'maryjo' > > > > > > it's happening. that's why i mentioned it... > > > > > > > > > > > > On Mon, 1 Mar 2004, Gary Krockover wrote: > > > > > > > Sure: > > > > > > > > [grep search= $&replace=][YOUR_VAR][/grep] > > > > > > > > But I agree, a Trim would be nice, as in PHP: > > > > > > > > string trim ( string str [, string charlist]) > > > > > > > > Note: The optional charlist parameter was added in PHP 4.1.0 > > > > > > > > This function returns a string with whitespace stripped from the > beginning > > > > and end of str . Without the second parameter, trim() will strip these > > > > characters: > > > > > > > > " " (ASCII 32 (0x20)), an ordinary space. > > > > > > > > "\t" (ASCII 9 (0x09)), a tab. > > > > > > > > "\n" (ASCII 10 (0x0A)), a new line (line feed). > > > > > > > > "\r" (ASCII 13 (0x0D)), a carriage return. > > > > > > > > "\0" (ASCII 0 (0x00)), the NUL-byte. > > > > > > > > "\x0B" (ASCII 11 (0x0B)), a vertical tab. > > > > > > > > You can also specify the characters you want to strip, by means of the > > > > charlist parameter. Simply list all characters that you want to be > > > > stripped. With .. you can specify a range of characters. > > > > > > > > Then there's ltrim() and rtrim(). > > > > > > > > I guess one could be constructive and use a combo of the convertchars > db > > > > and grep.... > > > > > > > > > > > > GK > > > > > > > > At 07:45 PM 3/1/2004, you wrote: > > > > > > > > > > > > >is there such a thing? i have this client that wanted to use user's > real > > > > >name to authenticate themselves when they subscribe but every week at > > > > >least one new subscriber will call to ask why he can not log on. 99% > of > > > > >the time is because they've put an extra white space after their > name. > > > > >is there [trim] command? and if not - why not? > > > > >i can just replace spaces but sometimes 'Mary Jo' will show up as a > > > > >first name. the only solution is, i think, a loop that checks for > empty > > > > >space characters at the end and deleting them until it finds a > character > > > > >but [trim] would be so much better... is there [trim] in 6? > > > > > > > > > >thanks... > > > > > > > > > > > > ------------------------------------------------------------- > > > > This message is sent to you because you are subscribed to > > > > the mailing list . > > > > To unsubscribe, E-mail to: > > > > To switch to the DIGEST mode, E-mail to > > > > > Web Archive of this list is at: http://webdna.smithmicro.com/ > > > > > > > > > > > > > ------------------------------------------------------------- > > > This message is sent to you because you are subscribed to > > > the mailing list . > > > To unsubscribe, E-mail to: > > > To switch to the DIGEST mode, E-mail to > > > > Web Archive of this list is at: http://webdna.smithmicro.com/ > > > > > > > > > ------------------------------------------------------------- > > This message is sent to you because you are subscribed to > > the mailing list . > > To unsubscribe, E-mail to: > > To switch to the DIGEST mode, E-mail to > > > Web Archive of this list is at: http://webdna.smithmicro.com/ > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [trim]?! ( Terry Wilson 2004)
  2. Re: [trim]?! ( William DeVaul 2004)
  3. Re: [trim]?! ( Marc Kaiwi 2004)
  4. Re: [trim]?! ( Kalin Mintchev 2004)
  5. Re: [trim]?! ( "WebDna @ Inkblot Media" 2004)
  6. Re: [trim]?! ( Kalin Mintchev 2004)
  7. Re: [trim]?! ( Kalin Mintchev 2004)
  8. Re: [trim]?! ( "Dan Strong" 2004)
  9. Re: [trim]?! ( Gary Krockover 2004)
  10. [trim]?! ( Kalin Mintchev 2004)
On Mon, 1 Mar 2004, WebDna @ Inkblot Media wrote: > If you are running webcat 5 the getchars has a trim. i'm not.. thanks... > > > ----- Original Message ----- > From: "Kalin Mintchev" > To: "WebDNA Talk" > Sent: Monday, March 01, 2004 6:26 PM > Subject: Re: [trim]?! > > > > > > > > oh, i see now the $... didn't know thw webDNA grep is like the 'real' > > grep... sorry.... > > > > > > On Mon, 1 Mar 2004, Kalin Mintchev wrote: > > > > > > > > > > > thanks... grep is great but replaces ALL the spaces - the problem is > when > > > they use names with spaces in them... like 'Mary Jo', or 'Mary Ann' > etc.. > > > i.e.: > > > if i have: > > > > > > [text]name=mary jo [/text] > > > > > > [trim][name][/trim] should produce 'mary jo' > > > > > > wheres [grep search= $&replace=][name][/grep] will produce 'maryjo' > > > > > > it's happening. that's why i mentioned it... > > > > > > > > > > > > On Mon, 1 Mar 2004, Gary Krockover wrote: > > > > > > > Sure: > > > > > > > > [grep search= $&replace=][YOUR_VAR][/grep] > > > > > > > > But I agree, a Trim would be nice, as in PHP: > > > > > > > > string trim ( string str [, string charlist]) > > > > > > > > Note: The optional charlist parameter was added in PHP 4.1.0 > > > > > > > > This function returns a string with whitespace stripped from the > beginning > > > > and end of str . Without the second parameter, trim() will strip these > > > > characters: > > > > > > > > " " (ASCII 32 (0x20)), an ordinary space. > > > > > > > > "\t" (ASCII 9 (0x09)), a tab. > > > > > > > > "\n" (ASCII 10 (0x0A)), a new line (line feed). > > > > > > > > "\r" (ASCII 13 (0x0D)), a carriage return. > > > > > > > > "\0" (ASCII 0 (0x00)), the NUL-byte. > > > > > > > > "\x0B" (ASCII 11 (0x0B)), a vertical tab. > > > > > > > > You can also specify the characters you want to strip, by means of the > > > > charlist parameter. Simply list all characters that you want to be > > > > stripped. With .. you can specify a range of characters. > > > > > > > > Then there's ltrim() and rtrim(). > > > > > > > > I guess one could be constructive and use a combo of the convertchars > db > > > > and grep.... > > > > > > > > > > > > GK > > > > > > > > At 07:45 PM 3/1/2004, you wrote: > > > > > > > > > > > > >is there such a thing? i have this client that wanted to use user's > real > > > > >name to authenticate themselves when they subscribe but every week at > > > > >least one new subscriber will call to ask why he can not log on. 99% > of > > > > >the time is because they've put an extra white space after their > name. > > > > >is there [trim] command? and if not - why not? > > > > >i can just replace spaces but sometimes 'Mary Jo' will show up as a > > > > >first name. the only solution is, i think, a loop that checks for > empty > > > > >space characters at the end and deleting them until it finds a > character > > > > >but [trim] would be so much better... is there [trim] in 6? > > > > > > > > > >thanks... > > > > > > > > > > > > ------------------------------------------------------------- > > > > This message is sent to you because you are subscribed to > > > > the mailing list . > > > > To unsubscribe, E-mail to: > > > > To switch to the DIGEST mode, E-mail to > > > > > Web Archive of this list is at: http://webdna.smithmicro.com/ > > > > > > > > > > > > > ------------------------------------------------------------- > > > This message is sent to you because you are subscribed to > > > the mailing list . > > > To unsubscribe, E-mail to: > > > To switch to the DIGEST mode, E-mail to > > > > Web Archive of this list is at: http://webdna.smithmicro.com/ > > > > > > > > > ------------------------------------------------------------- > > This message is sent to you because you are subscribed to > > the mailing list . > > To unsubscribe, E-mail to: > > To switch to the DIGEST mode, E-mail to > > > Web Archive of this list is at: http://webdna.smithmicro.com/ > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Kalin Mintchev

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:

tpl and Explorer (1998) [Announce] WebCatalog 3.0 Beta Program (1998) Formating found categories (1997) tax rate off by 1 cent (1997) too many nested tags ... (1997) emailer setup (1997) Make sure I understand this??? (1997) [OT] will work for... (2003) system crashes, event log (1997) OFF-TOPIC: Check www.godaddy.com for me ... (2003) carriage returns in data (1997) listfiles-looking for slick solution (1997) RE: HTTP Header info (1997) Interfacing WebMerchant to www.fedex.com (1997) Email notification to one of multiple vendors ? (1997) WC2b15 File Corruption (1997) WC2b15 File Corruption (1997) HELP WITH DATES (1997) [OT] (waaaay OT) further off topic than before (2004) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)