Bash String Functions Substring Javascript Method Syntax In Java