If String Not Empty Powershell Substring Syntax In Java