String and Number HowTo
*Read me*
String
Convert from type X to type Y
Strip certain characters from String
Replace/remove character in a String
Replace every occurences of a string within a string
"Tokenize" a string
Split a string using String.split()
Optimize String operations
Remove spaces from a String
Test if a String starts with a digit or uppercase letter
Get InputStream from a String
Easy String padding
Replace \r\n with the <br> tag
Remove accent from letters (ex .é to e)
Apply a mask to a string
Format a String (JDK1.5)
Replace a "\" by "\\"
Substitute tokens in a String
Compare accentuated letters
Create a String with a fixed length
Unquote a String
Escape HTML special characters from a String
Unescape HTML special characters from a String
Detect non-ASCII character in a String
Remove HTML tags from a file to extract only the TEXT
Extract links from an HTML page
Convert a byte array to a Hex string
Apply proper uppercase and lowercase on a String
Encode/Decode to/from Base64
Justify string with wordwrap
Shorten a long path
Number
Convert from type X to type Y
Type conversion (JDK1.5)
Round a double
Display numbers with commas
Display numbers in scientific notation
Display numbers with leading zeroes
Get a random number
Convert an UNSIGNED byte to a JAVA integer
Deal with the big-endian and little-endian order
Pass an integer by reference
Pass floats as string literals to a method
Get random numbers
Convert number to words
Arithmetic with double
Detect even/odd number
Convert bytes to megabytes
Validate a number
Get a unique identifier
Validate/Convert a number using the current Locale()
String and Number HowTo
If you find this article useful, consider making a small donation
to show your support for this Web site and its content.
Written and compiled by Réal Gagnon ©1998-2010
[
home
]