LTEXT

From SC4D Encyclopaedia
Revision as of 02:31, 27 July 2008 by sc4e>JoeST (New page: LText files are used to make lots etc. multilingual {{expand}} ==File Structure== The file has a 2 byte header and then each character is UTF-16 (I think) here is a PHP function that ret...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

LText files are used to make lots etc. multilingual

File Structure

The file has a 2 byte header and then each character is UTF-16 (I think)

here is a PHP function that returns the string enclosed in an LTEXT file

function ltextThing($data){
/*ExemplarFile
	typeID: 6534284a
	$value = the 'content' array key*/

	$thing = str_split($data);
	foreach ($thing as $char => $word){
		if ($char % 2 == int and $char != 2)
			$return .= $word;
	}
return $return;	
}