コード例 #1
0
ファイル: HStringRemove.php プロジェクト: ericpoe/ophp
 /**
  * @param $value
  * @return HString
  */
 public function remove($value)
 {
     $key = $this->hString->locate($value);
     $startString = $this->hString->slice(0, $key);
     $endString = $this->hString->slice($key + 1);
     return $startString->insert($endString);
 }
コード例 #2
0
ファイル: HStringRemove.php プロジェクト: ericpoe/haystack
 /**
  * @param $value
  * @return HString
  */
 public function remove($value)
 {
     $key = $this->hString->locate($value);
     return new HString($this->getPrefix($key) . $this->getSuffix($key));
 }