From 1ac5eb06e3f0328f10470e5c35e0ba1555022fe0 Mon Sep 17 00:00:00 2001 From: Saqib Razzaq Date: Thu, 3 Mar 2016 02:01:04 -0800 Subject: [PATCH] - action : function getStringBetween() added - description : a function to get part of string between two characters --- upload/includes/functions.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/upload/includes/functions.php b/upload/includes/functions.php index 8797475b..abaf3aa6 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -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' );