- action : function getStringBetween() added

- description : a function to get part of string between two characters
This commit is contained in:
Saqib Razzaq 2016-03-03 02:01:04 -08:00
parent b4d173c298
commit 1ac5eb06e3

View file

@ -4451,6 +4451,7 @@
return join('',$return_string);
}
function callback_month($month)
{
return date('M',mktime(0,0,0,$month,1));
@ -5381,6 +5382,22 @@
}
}
}
/**
* Get part of a string between two characters
*
* @param : { string } { $str } { string to read }
* @param : { string } { $from } { character to start cutting }
* @param : { string } { $to } { character to stop cutting }
* @return : { string } { requested part of stirng }
* @since : 3rd March, 2016 ClipBucket 2.8.1
* @author : Saqib Razzaq
*/
function getStringBetween($str,$from,$to) {
$sub = substr($str, strpos($str,$from)+strlen($from),strlen($str));
return substr($sub,0,strpos($sub,$to));
}
include( 'functions_db.php' );
include( 'functions_filter.php' );