WordPress at a glance
function is not described

getid3_quicktime::MaybePascal2String() public WP 1.0

{} It's a method of the class: getid3_quicktime{}

No Hooks.

Return

String.

Usage

$getid3_quicktime = new getid3_quicktime();
$getid3_quicktime->MaybePascal2String( $pascalstring );
$pascalstring(string) (required)
-

Code of getid3_quicktime::MaybePascal2String() WP 5.7.2

<?php
public function MaybePascal2String($pascalstring) {
	// Pascal strings have 1 unsigned byte at the beginning saying how many chars (1-255) are in the string
	// Check if string actually is in this format or written incorrectly, straight string, or null-terminated string
	if (ord(substr($pascalstring, 0, 1)) == (strlen($pascalstring) - 1)) {
		return substr($pascalstring, 1);
	} elseif (substr($pascalstring, -1, 1) == "\x00") {
		// appears to be null-terminated instead of Pascal-style
		return substr($pascalstring, 0, -1);
	}
	return $pascalstring;
}