docs: protected static String getExtension(String scriptName)
      {
          if (scriptName == null)
          {
              return null;
          }
  
          int filePosition = scriptName.lastIndexOf("/");
          String fileName;
  
          if (scriptName.lastIndexOf("\\") > filePosition)
          {
              filePosition = scriptName.lastIndexOf("\\");
          }
  
          if (filePosition >= 0)
          {
              fileName = scriptName.substring(filePosition + 1);
          }
          else
          {
              fileName = scriptName;
          }
  
          final int extensionPosition = fileName.lastIndexOf(".");
          if (extensionPosition >= 0)
          {
              return fileName.substring(extensionPosition + 1);
          }
  
          return null;
      }