-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Massimiliano,
Massimiliano PASQUALONI wrote: String Paula = "Brilliant"; You can replace all the code below with this gem: boolean myBoolean = Boolean.valueOf(yourString).booleanValue(); Don't try to re-invent the wheel. Most of the things like this have already been done by someone else, and probably better. So, learn from and take advantage of the work others have done before you. > public boolean StringToBoolean(String StrBool) > { > boolean convertito=false; > > if ((StrBool == "1") || (StrBool == "On") || (StrBool == > "on") || (StrBool == "Yes") || (StrBool == "yes") || (StrBool == "Si") || > (StrBool == "si") || (StrBool == "True") || (StrBool == "true")) > { > convertito = true; > } > > if ((StrBool == "0") || (StrBool == "Off") || (StrBool == > "off") || (StrBool == "No") || (StrBool == "no") || (StrBool == "False") > || (StrBool == "false")) > { > convertito = false; > } > > return convertito; > } - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGUzgE9CaO5/Lv0PARAlJJAJ9XdavG7OXesi3bTaqMVdrJe3nUqwCgwuNU 2K2hHPrMKDH8NLAHvKcR8ek= =fK6t -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]