43 Commits

Author SHA1 Message Date
Daniel Saier
e39e63191f
Add support for some missing escape sequences (#399) 2025-10-08 21:56:54 +08:00
blueloveTH
62491dd99a reimpl str.format 2025-09-17 14:10:26 +08:00
blueloveTH
7016a8780c use 24 bytes data
Update pocketpy.h

Update pocketpy.h
2025-07-13 23:55:45 +08:00
blueloveTH
d5a511ad7c fix https://github.com/pocketpy/pocketpy/issues/378 2025-07-03 18:04:36 +08:00
blueloveTH
0d9bf2e7de optimize small string 2025-04-26 21:43:57 +08:00
blueloveTH
61e36941a9 ... 2025-03-12 19:56:26 +08:00
blueloveTH
e25cc48463 improve chr 2025-03-12 19:43:56 +08:00
blueloveTH
ffbc7e9ade intern ascii literals 2025-01-23 20:02:55 +08:00
blueloveTH
104785c94b fix str.split 2024-11-14 19:52:23 +08:00
blueloveTH
adf5fa5ac2 fix https://github.com/pocketpy/pocketpy/issues/296 2024-08-16 12:37:50 +08:00
blueloveTH
88f893ddd7 ... 2024-08-10 20:21:40 +08:00
blueloveTH
f34035100c ... 2024-07-14 12:47:46 +08:00
blueloveTH
31c95c7ba2 some update 2024-07-07 03:33:06 +08:00
blueloveTH
29aa3e5eed some fix 2024-07-07 03:27:07 +08:00
blueloveTH
1a9bad4e54 some fix 2024-07-07 02:19:37 +08:00
blueloveTH
79012a6b08 some fix 2024-07-07 00:56:02 +08:00
blueloveTH
3787a1da1d init 2024-06-10 22:38:49 +08:00
blueloveTH
d7c38f95b5 some fix 2024-05-19 16:21:50 +08:00
albertexye
936870c1f0
Perform boundary checks before searching to prevent security vulnerabilities (#237)
* perform boundary check before searching to prevent security vulnerabilities

* when a negative start index is passed to str.find, 0 is used instead

* a ValueError is raised when argument 'start' is a negative integer
2024-04-02 13:38:45 +08:00
albertexye
b1115a4c8f
Check the size of fillchar passed to str methods (ljust, rjust) (#236)
* check the size of fillchar passed to str methods (ljust, rjust)

* count characters using u8_length instead of size
2024-04-02 02:41:45 +08:00
Anurag Bhat
2ab819a724
Modify string constructor to allow no arguments (#226)
* Modify String Constructor

* Add check to restrict arguments
2024-03-13 00:55:54 +08:00
blueloveTH
0df619b66f str.index and str.find supports __start 2024-02-17 20:45:08 +08:00
blueloveTH
cc076bbc00 fix cases 2024-02-05 15:57:36 +08:00
blueloveTH
c154d40da6 add more cases 2024-02-05 15:54:39 +08:00
blueloveTH
faa01ac82e fix a bug of hex 2024-02-05 15:50:13 +08:00
blueloveTH
fba9d87ccd add cases 2024-02-05 15:29:23 +08:00
blueloveTH
8f11ce0466 move strip methods into cpp 2024-02-05 14:48:00 +08:00
blueloveTH
e150ffae5e rename UNREACHABLE() to PK_UNREACHABLE() 2024-01-04 13:01:26 +08:00
blueloveTH
0419eb5bb0 temp fix a bug of f"{stack[2:]}" 2023-12-19 20:21:17 +08:00
blueloveTH
f2d5fbbb94 add module operator and add split for single char 2023-10-29 22:16:49 +08:00
blueloveTH
098b85f89b ... 2023-10-07 11:55:57 +08:00
blueloveTH
88c80a2340 ... 2023-08-29 23:57:33 +08:00
blueloveTH
e21005e5d2 add Str::split 2023-08-28 00:34:13 +08:00
blueloveTH
f9c0a95237 optimize str's iterator 2023-08-22 23:55:11 +08:00
blueloveTH
2fddde4f9c ... 2023-06-25 03:01:16 +08:00
blueloveTH
9ea76aee85 ... 2023-06-15 22:07:16 +08:00
blueloveTH
b77b0f9b3a ... 2023-06-15 19:06:56 +08:00
blueloveTH
681e674ff5 fix https://github.com/blueloveTH/pocketpy/issues/80 2023-06-15 02:44:57 +08:00
blueloveTH
bf89f21df0 ... 2023-06-11 23:09:42 +08:00
blueloveTH
721b7a2959 fix https://github.com/blueloveTH/pocketpy/issues/59 2023-04-27 14:55:39 +08:00
blueloveTH
cb36966464 fix https://github.com/blueloveTH/pocketpy/issues/65 2023-04-27 13:44:24 +08:00
blueloveTH
7a07eefed0 up
Update main.yml

Update main.yml

up

Update main.yml

update

Update main.yml

up

Update 04_str.py

Update run_tests.sh
2023-03-17 03:51:46 +08:00
blueloveTH
809fd8dd8c update test 2023-03-16 16:07:17 +08:00