diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-20 10:56:22 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-20 10:56:22 +0000 |
| commit | cf9af14fe749c52473fdf5a327c3e935e45bf0e7 (patch) | |
| tree | 4c22c4a919e3da709b16055ff6762ea1195b6237 /pseudocode-lib/README.md | |
| parent | 1ed0e276a37d39386b22b08c1f9e575a8f8f8725 (diff) | |
feat(library): add experimental string LEFT function
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'pseudocode-lib/README.md')
| -rw-r--r-- | pseudocode-lib/README.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pseudocode-lib/README.md b/pseudocode-lib/README.md index 92a4bbb..b776d16 100644 --- a/pseudocode-lib/README.md +++ b/pseudocode-lib/README.md @@ -17,4 +17,6 @@ INCLUDE paths are relative to the program. Adjust them when the program is elsew `_EXP_STRING` owns an unbounded `std::string` through one handle. Constructors accept no arguments, another `_EXP_STRING`, `C_STRING`, or `(INTEGER count, C_CHAR character)`. Cast literals to C types explicitly; built-in STRING is not a constructor argument. Copy construction and assignment own independent strings. `_HANDLE` is public only for library implementation access; do not modify or free it. -The first version provides `&`, `_EXP_STRING_NUM_TO_STR` (INTEGER/REAL), `_EXP_STRING_STR_TO_NUM` (REAL), `_EXP_STRING_LENGTH` (byte length) and `_EXP_STRING_OUTPUT` (text plus newline). Numeric formatting uses `std::to_string`; parsing uses `std::stod` and requires full consumption. C++ standard exceptions print the user call line and are catchable with TRY/CATCH. The built-in STRING remains available with its existing lifetime and NUL limitations. Owning class values inside whole-record or BYVAL-array copies still have bitwise-copy limitations. +The library provides `&`, `_EXP_STRING_NUM_TO_STR` (INTEGER/REAL), `_EXP_STRING_STR_TO_NUM` (REAL), `_EXP_STRING_LENGTH` (byte length) and `_EXP_STRING_OUTPUT` (text plus newline). Numeric formatting uses `std::to_string`; parsing uses `std::stod` and requires full consumption. C++ standard exceptions print the user call line and are catchable with TRY/CATCH. The built-in STRING remains available with its existing lifetime and NUL limitations. Owning class values inside whole-record or BYVAL-array copies still have bitwise-copy limitations. + +`_EXP_STRING_LEFT(S : _EXP_STRING, Count : INTEGER)` returns a new `_EXP_STRING` containing up to Count bytes from the beginning. Nonpositive counts return an empty string; counts exceeding the length return the whole string. Embedded NUL bytes are preserved. |
