<?php
defined('WikyBlog') or die("Not an entry point...");

//
//
//	This is loaded if the Multibyte String Functions are not available
//
//
$GLOBALS['wbDefaultCharset'] = 'ISO-8859-1';

function wbUcwords($str){	return ucwords($str);}
function wbStrlen($str){		return strlen($str);}
function wbStrtoupper($str){	return strtoupper($str);}
function wbStrtolower($str){	return strtolower($str);}

function wbHtmlspecialchars($str,$style=ENT_COMPAT){
	return htmlspecialchars($str,$style);
}

function wbSubstr_replace($str,$repl,$start,$length=false){
	if( $length === false ){
		return substr_replace($str,$repl,$start);
	}
	return substr_replace($str,$repl,$start,$length);
}


function wbStr_replace($search,$replace,$str){
	return str_replace($search,$replace,$str);
}
	
function wbExplode($sep,$str,$limit=false){
	if( $limit !== false ){
		return explode($sep,$str,$limit );
	}
	return explode($sep,$str);
}

function wbSubstr($str,$start,$length=false){
	if( $length !== false ){
		return substr($str,$start,$length);
	}else{
		return substr($str,$start);
	}
}

function wbStrpos($haystack,$needle,$offset=false){
	if( $offset !== false ){
		return strpos($haystack,$needle,$offset);
	}
	return strpos($haystack,$needle);
}

