code: private String removeAsterisk(String str)
     {
        if (str.startsWith("*"))
        {
           str = str.substring(1);
        }
  
        if (str.endsWith("*"))
        {
           str = str.substring(0, str.length() - 1);
        }
  
        return str;
     }
docs: Removes asterisk from beginning and from end of statement.