Parsed: 112175

  public static function TrimTerm($string) {
    // remove terminator, only if present (it should be, but...)
    if (substr($string, -2) === "\x00\x00") {
      $string = substr($string, 0, -2);
    }
    return $string;
  }