What about an ends with operator?

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 33060
interpreted = N
texte = I think it would be very useful to have an ends with comparison operator -- so when we use a showif inside a listfiles context, we would have a simple way to show only the files that END WITH a certain suffix.Practically all the files in a website have a suffix of one kind or another, right? So this seems like a very practical addition to the webdna language ... because it would let us very easily list specific file types without a whole lot of confusing code to deal with.As it is now, we have contains (^), but it cannot do the job on its own, which means we have to write a whole bunch of additional (relatively complex) code in order to get a simple list of all the .db files in a folder, or all the .tpl files in a folder, etc., etc.In other words, we cannot get what we want like this:[listfiles ...] [showif [filename]^.db]... because sometimes the .db is not at the end of the file name, such as when there's a stuffit file like something.db.sit in the folder. But if we had an ends with operator, for example *, then we could do it like this:[listfiles ...] [showif [filename]*.db]... because the something.db.sit file would NOT be shown, but the something.db file (and every other file ending with .db, which is exactly what we want) would be shown.Does anyone else think this is a good idea?================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: What about an ends with operator? (Kenneth Grome 2000)
  2. Re: What about an ends with operator? (Michael Winston 2000)
  3. Re: What about an ends with operator? (John Butler 2000)
  4. Re: What about an ends with operator? (Aaron Lynch 2000)
  5. What about an ends with operator? (Kenneth Grome 2000)
I think it would be very useful to have an ends with comparison operator -- so when we use a showif inside a listfiles context, we would have a simple way to show only the files that END WITH a certain suffix.Practically all the files in a website have a suffix of one kind or another, right? So this seems like a very practical addition to the webdna language ... because it would let us very easily list specific file types without a whole lot of confusing code to deal with.As it is now, we have contains (^), but it cannot do the job on its own, which means we have to write a whole bunch of additional (relatively complex) code in order to get a simple list of all the .db files in a folder, or all the .tpl files in a folder, etc., etc.In other words, we cannot get what we want like this:[listfiles ...] [showif [filename]^.db]... because sometimes the .db is not at the end of the file name, such as when there's a stuffit file like something.db.sit in the folder. But if we had an ends with operator, for example *, then we could do it like this:[listfiles ...] [showif [filename]*.db]... because the something.db.sit file would NOT be shown, but the something.db file (and every other file ending with .db, which is exactly what we want) would be shown.Does anyone else think this is a good idea?================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================------------------------------------------------------------- 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://search.smithmicro.com/ Kenneth Grome

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:

Protect and Serve (1999) SetHeader not Working (2006) WebCatalog-beta@talk.smithmicro.com list Hello... (2000) Two stores, one server (1998) Talk List Suggestions (1997) Secure server question (1997) Protecting webdelivery (1997) Search in 2 or more catalogs (1997) Separate SSL Server (1997) [Sum] function? (1997) WebCat2b13 Command Reference Doc error (1997) Requiring that certain fields be completed (1997) Country & Ship-to address & other fields ? (1997) virtual virtual hosted store.... (1998) New Beta Documentation (1997) 4.5.1 on Panther? (2004) Locking up with WebCatalog... (1997) ssh shutdown (2005) RE: Loss in form (1998) ShowNext for method=POST (1997)