diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-17 01:31:45 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-17 01:31:45 +0900 |
| commit | ccc62145d5ca22d22ff01bf387d6fd3d27ab87b5 (patch) | |
| tree | f83eaec9bddcc6d461667784e65e757b040cd2b4 /crates/shirabe-php-shim/src/lib.rs | |
| parent | 910d1060c7ce98d01017d6239eaad600b6830cf0 (diff) | |
| download | php-shirabe-ccc62145d5ca22d22ff01bf387d6fd3d27ab87b5.tar.gz php-shirabe-ccc62145d5ca22d22ff01bf387d6fd3d27ab87b5.tar.zst php-shirabe-ccc62145d5ca22d22ff01bf387d6fd3d27ab87b5.zip | |
feat(port): port Intervals.php
Add Clone derives to Constraint, Interval, and DevConstraintSet
(needed for IntervalCollection).
Add preg_match/preg_replace/preg_split stubs to shirabe-php-shim.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-shim/src/lib.rs')
| -rw-r--r-- | crates/shirabe-php-shim/src/lib.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs index c95cc28..be44c6c 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -615,6 +615,22 @@ pub fn preg_quote(str: &str, delimiter: Option<char>) -> String { todo!() } +// Returns 1 on match, 0 on no match; populates matches[0]=full match, matches[1..]=captures. +// Optional groups that did not participate in the match are stored as None. +pub fn preg_match(pattern: &str, subject: &str, matches: &mut Vec<Option<String>>) -> i64 { + todo!() +} + +// Returns Some(result) on success, None on error. +pub fn preg_replace(pattern: &str, replacement: &str, subject: &str) -> Option<String> { + todo!() +} + +// Returns Some(parts) on success, None on error. +pub fn preg_split(pattern: &str, subject: &str) -> Option<Vec<String>> { + todo!() +} + pub fn dirname(path: &str) -> String { todo!() } |
