diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-12 01:01:35 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-12 01:01:43 +0900 |
| commit | 1e44f5723e4c0e0903d00a61f254901e612fe5e1 (patch) | |
| tree | 9c2e1eec364bbf6418a4072ee7767b04c3df0297 /crates/shirabe-external-packages/src/symfony/string | |
| parent | ddf0a624145b618c05c2ee47414545b99b685f37 (diff) | |
| download | php-shirabe-1e44f5723e4c0e0903d00a61f254901e612fe5e1.tar.gz php-shirabe-1e44f5723e4c0e0903d00a61f254901e612fe5e1.tar.zst php-shirabe-1e44f5723e4c0e0903d00a61f254901e612fe5e1.zip | |
feat(symfony-console): port Symfony Console and make the workspace compile
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/string')
4 files changed, 68 insertions, 0 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/string/byte_string.rs b/crates/shirabe-external-packages/src/symfony/string/byte_string.rs new file mode 100644 index 0000000..58f4697 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/string/byte_string.rs @@ -0,0 +1,16 @@ +use crate::symfony::string::code_point_string::CodePointString; + +#[derive(Debug, Clone)] +pub struct ByteString { + pub(crate) string: String, +} + +impl ByteString { + pub fn new(_string: &str) -> Self { + todo!() + } + + pub fn to_code_point_string(&self, _encoding: &str) -> CodePointString { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/string/code_point_string.rs b/crates/shirabe-external-packages/src/symfony/string/code_point_string.rs new file mode 100644 index 0000000..3a1eee2 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/string/code_point_string.rs @@ -0,0 +1,14 @@ +#[derive(Debug, Clone)] +pub struct CodePointString { + pub(crate) string: String, +} + +impl CodePointString { + pub fn wordwrap(&self, _width: i64, _break: &str, _cut: bool) -> Self { + todo!() + } + + pub fn to_byte_string(&self, _encoding: &str) -> String { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/string/mod.rs b/crates/shirabe-external-packages/src/symfony/string/mod.rs new file mode 100644 index 0000000..411a3f3 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/string/mod.rs @@ -0,0 +1,16 @@ +pub mod byte_string; +pub mod code_point_string; +pub mod unicode_string; + +pub use byte_string::*; +pub use code_point_string::*; +pub use unicode_string::*; + +/// Mirror of Symfony's `u()` / `b()` helper functions. +pub fn b(_string: &str) -> ByteString { + todo!() +} + +pub fn s(_string: &str) -> UnicodeString { + todo!() +} diff --git a/crates/shirabe-external-packages/src/symfony/string/unicode_string.rs b/crates/shirabe-external-packages/src/symfony/string/unicode_string.rs new file mode 100644 index 0000000..18b1d49 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/string/unicode_string.rs @@ -0,0 +1,22 @@ +#[derive(Debug, Clone)] +pub struct UnicodeString { + pub(crate) string: String, +} + +impl UnicodeString { + pub fn new(_string: &str) -> Self { + todo!() + } + + pub fn width(&self, _ignore_unsupported_encoding: bool) -> i64 { + todo!() + } + + pub fn length(&self) -> i64 { + todo!() + } + + pub fn slice(&self, _start: i64, _length: Option<i64>) -> Self { + todo!() + } +} |
