Re: Removing a character
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 27916
interpreted = N
texte = On 2/21/00 8:58 pm, Brian B. Burton so noted...>What is the smallest amount of code (please show) that you can write to>accomplish this simple task:>>You are given a database containing a field of data left padded by zeros>that you need to clean out. Example:>>Given -> What you want>----- ------------->00B B>BLK BLK>BL0 BL0>0BT BT>0Y0 Y0>>Any quick ideas (looking for least processor intensive, and prefer to avoid>a lookup or looping convertchars)?Well, it uses a loop : )This assumes you have no 000 values you want to drop to , though you *could* check to see if [startpoint]=4 to test for that special case if need be.[text]source=0Y0[/text][math show=f]startpoint=1[/math][loop start=1&end=3][showif [math][getchars start=1&end=[index]][source][/getchars]*0[/math]=0][math show=f]startpoint=[index]+1[/math][/showif][/loop][text]editSource=[getchars start=[startpoint]][source][/getchars][/text]Stick that into something that passes through your database, replacing [source] with your data. There's no need to assign the result to it's own text variable -- that could be included in your [append] or [replace].Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to
.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
Associated Messages, from the most recent to the oldest:
On 2/21/00 8:58 pm, Brian B. Burton so noted...>What is the smallest amount of code (please show) that you can write to>accomplish this simple task:>>You are given a database containing a field of data left padded by zeros>that you need to clean out. Example:>>Given -> What you want>----- ------------->00B B>BLK BLK>BL0 BL0>0BT BT>0Y0 Y0>>Any quick ideas (looking for least processor intensive, and prefer to avoid>a lookup or looping convertchars)?Well, it uses a loop : )This assumes you have no 000 values you want to drop to , though you *could* check to see if [startpoint]=4 to test for that special case if need be.[text]source=0Y0[/text][math show=f]startpoint=1[/math][loop start=1&end=3][showif [math][getchars start=1&end=[index]][source][/getchars]*0[/math]=0][math show=f]startpoint=[index]+1[/math][/showif][/loop][text]editSource=[getchars start=[startpoint]][source][/getchars][/text]Stick that into something that passes through your database, replacing [source] with your data. There's no need to assign the result to it's own text variable -- that could be included in your [append] or [replace].Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .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
Rob Marquardt
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:
WebCatalog Technical Reference (1997)
webcat error log (1998)
Bug Report, maybe (1997)
PCS Frames (1997)
Re:Emailer setup (1997)
Upgrading old WebCat Database Files (1997)
Too Much Rootbeer Free Offer (1997)
Error: Too many nested [xxx] contexts (1997)
Resume Catalog ? (1997)
Date Calulation (1997)
Multiple catalog databases and showcart (1997)
Date Formats (1997)
[WebDNA] jumpstart me? - how to auto-upload to a remote server? (2010)
Re[2]: Next X hits (1996)
converting dates in database (1998)
Upgrage pricing... The future of WebCatalog is coming (2000)
Country & Ship-to address & other fields ? (1997)
WebCat for Site Search? (1997)
Why is deleting so slow? (2002)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)