-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Greg Fenton <[EMAIL PROTECTED]> writes:
> I'm a hack...there, I said it.
>
> Need help with a simple elisp function. I want to
> take a string, strip out all lower-case characters,
> and down-case the resulting string.
>
> So, for example,
> (my-func "NumberFormatException") yields "nfe"
> (my-func "IOException") yields "ioe"
>
> I can write a function to do it using my elementary knowledge of low-level
> elisp functions, but I'm SURE there's an easy way to do this (or might even
> already be such a function in JDE???)
I don't think there is a way. I had this elisp around
(defun jde-shorten-classname(classname)
"Given a classname convert it to a shorter one. IE IOException -> ioe."
(let((index 0)
(short-version "")
(case-fold-search nil))
(while (string-match "[A-Z]" classname index)
(setq short-version (concat short-version (match-string 0 classname)))
(setq index (match-end 0)))
(downcase short-version)))
- --
Need a good Engineer? Hire me! ( Java | P2P | XML | Linux | Open Source )
Kevin A. Burton [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] )
Location: San Francisco, CA Cell: 415-595-9965 URL: http://relativity.yi.org
The 9000 series is the most reliable computer ever made. No 9000 computer has
ever made a mistake or distorted information. We are all, by any practical
definition of the words, fool proof and incapable of error.
- Hal
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt
iD8DBQE7zKwRAwM6xb2dfE0RAraMAJ44WY9Z12m9O0PVkrsdvwmCJclV1wCdF0gC
1VCosaFrt939VmidH/ojXgw=
=yA2l
-----END PGP SIGNATURE-----