JS and Java String manipulation.

Signed-off-by: cocolekat <cocolekat@gmail.com>