improving bundle workflow.

This commit is contained in:
Taylor Otwell
2012-02-07 15:00:35 -06:00
parent aa53dc70ce
commit a11318863a
5 changed files with 104 additions and 38 deletions

View File

@@ -351,6 +351,18 @@ function str_contains($haystack, $needle)
return strpos($haystack, $needle) !== false;
}
/**
* Cap a string with a single instance of the given string.
*
* @param string $value
* @param string $cap
* @return string
*/
function str_finish($value, $cap)
{
return rtrim($value, $cap).$cap;
}
/**
* Return the value of the given item.
*