Variable Javascript String Substring C