aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-shim
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-11 23:28:40 +0900
committernsfisis <nsfisis@gmail.com>2026-08-11 23:28:40 +0900
commit38621c67917fd015f884ea04517791cdc5058c6d (patch)
tree03f466e2db22a3bc45e20e4f9694eb371a59b0e1 /crates/shirabe-php-shim
parent73ab00d3108933c952844b3820f44230c8203807 (diff)
downloadphp-shirabe-38621c67917fd015f884ea04517791cdc5058c6d.tar.gz
php-shirabe-38621c67917fd015f884ea04517791cdc5058c6d.tar.zst
php-shirabe-38621c67917fd015f884ea04517791cdc5058c6d.zip
chore(php-shim): drop the substring predicate ports
str_contains(), str_starts_with() and str_ends_with() were thin wrappers over the str methods of the same semantics. Call sites now use contains()/starts_with()/ends_with() directly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-shim')
-rw-r--r--crates/shirabe-php-shim/src/string.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/crates/shirabe-php-shim/src/string.rs b/crates/shirabe-php-shim/src/string.rs
index 8cab6eca..e53fc02c 100644
--- a/crates/shirabe-php-shim/src/string.rs
+++ b/crates/shirabe-php-shim/src/string.rs
@@ -14,18 +14,6 @@ pub fn str_replace(search: &str, replace: &str, subject: &str) -> String {
subject.replace(search, replace)
}
-pub fn str_contains(haystack: &str, needle: &str) -> bool {
- haystack.contains(needle)
-}
-
-pub fn str_starts_with(haystack: &str, needle: &str) -> bool {
- haystack.starts_with(needle)
-}
-
-pub fn str_ends_with(haystack: &str, needle: &str) -> bool {
- haystack.ends_with(needle)
-}
-
pub fn substr_count(haystack: &str, needle: &str) -> i64 {
if needle.is_empty() {
panic!("substr_count(): Argument #2 ($needle) cannot be empty");