If you're consistently using ; as the delimiter, you can explode() the string, remove the last index, then rejoin the string using implode():
$str = "This;is;my;long;string";
$strArr = explode(";", $str);
unset($strArr[count($strArr) - 1]);
$newStr = implode(";", $strArr);
UPDATE
In order to make this work for any searchable string, you can use array_keys():
$str = "This;is;my;long;string";
$strArr = explode(";", $str);
$searchStr = "string";
$caseSensitive = false;
$stringLocations = array_keys($strArr, $searchStr, $caseSensitive);
foreach ($stringLocations as $key) {
unset($strArr[$key]);
}
$newStr = implode(";", $strArr);
Or, even quicker, you can use array_diff():
$str = "This;is;my;long;string";
$strArr = explode(";", $str);
$searchStr = array("string");
$newArray = array_diff($searchStr, $strArr);
$newStr = implode(";", $newArray);