- action : function getStringBetween() added
- description : a function to get part of string between two characters
This commit is contained in:
parent
b4d173c298
commit
1ac5eb06e3
1 changed files with 17 additions and 0 deletions
|
@ -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' );
|
||||
|
|
Loading…
Add table
Reference in a new issue