/**

 * Author: 小破孩
 * Email: 3584685883@qq.com
 * Time: 2022/2/14 16:12
 * @param $str
 * @param $separator
 * @param string $mark
 * @return bool|false|mixed|string
 * Description:获取字符串
 */
public function getSubStr($str,$separator,$mark=':'){
    $arr = explode($separator,$str);
    if (empty($arr) || !isset($arr[1])) {
        return false;
    }
    $str = $arr[1];
    if (strpos($str,$mark) !== false) {
        return substr($str,0,strpos($str,$mark));
    }else{
        return $str;
    }
}
最后修改:2022 年 02 月 14 日 04 : 15 PM
对您有帮助的话,请赏包辣条吧 ^~^