RE: Re: drop down box or something like it.
"Hale, Paul" <Paul.Hale-uv/[email protected]>
| Newsgroups | gmane.comp.windows.shells.litestep |
|---|---|
| Message-ID | <23DBD872E5D0B44E8296E93447E0F607050489D0@01ohday01n00005.ad.bls.com> |
> -----Original Message----- > From: Jochen Ritzel [mailto:[email protected]] > > And now i will lead you away from the awful abomination that > some call "xtextedit" and it's mangled, mutated syntax ( for > which nothing but litestep is to blame for ) to the holy > light of (actually reuseable) lua > greatness: > > function split ( p ) > -- yeah the pattern looks more complex, but thats because > its alot more powerfull and works generally ^^ > return > {p:gsub("/","\\"):match("^(.-)\\?((%w+)%.?(%w-))\\?$")} > end > > function basename( p ) > return split( p )[2] > end > > function dirname( p ) > return split( p )[1] > end > > > --test code > path = "G:\\asdf\\Neuer Ordner\\test\\test.asd" > path2 = "test.asdf" > print( basename( path ) ) --> test.asd > print( dirname( path ) ) --> G:\asdf\Neuer Ordner\test print > ( basename(path2)) --> test.asdf print( dirname( path2 )) --> '' > > > ----- > > Now, join me in my neverending quest to build, provide and > use a nice lslua library ^^ ~thc4k > Yeah, like that is easier for an idiot like me. It may be more elegant, but it looks damn hard to me. Who know, I may take a look into it after my surgery when I have nothing but freetime. > > > --------------------------------------------------------------------- > Can't Unsubscribe? Check http://desktopian.org/listunsub.html > LS List Homepage: http://wuzzle.org/list/litestep.php > Get the LS FAQ: http://lsfaq.shellfront.org > > > ------------------------------------------------------------------------------ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary and or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this email in error, please contact the sender and delete the material from all computers. This electronic mail message was sent from L. M. Berry & Company or Berry Network, Inc. Our primary business address is 3170 Kettering Blvd., Dayton, OH 45439. This message may constitute a commercial solicitation or advertisement as defined by the CAN-SPAM act of 2003. If you do not wish to receive future commercial electronic mail solicitations or advertisements from L. M. Berry & Company or Berry Network, Inc., please send a request to [email protected] ============================================================================== --------------------------------------------------------------------- Can't Unsubscribe? Check http://desktopian.org/listunsub.html LS List Homepage: http://wuzzle.org/list/litestep.php Get the LS FAQ: http://lsfaq.shellfront.org