Closed am-cid closed 6 months ago
closes #246
first() takes in int, gets from the 0th char up to n. last() takes in int, gets last char up to n substr() takes two ints (n,m), gets from nth char up to mth char from() takes str (item), returns empty string if item is not in string. returns substring containing item up to end of the string upTo() takes str (item), returns empty string if item is not in string. returns substring containing beginning of string up to item
first()
last()
substr()
from()
upTo()
sample text file ------------------------------------------ 1 | 2 | fwunc mainuwu-san() [[ 3 | a-senpai = "hello"~ 4 | b-chan~ 5 | b = a.first("").first(2,2).len()~ 6 | b = a.last(2,2).len()~ 7 | b = a.upTo(2,2).len()~ 8 | b = a.from(2,2).len()~ 9 | b = a.substr(2,2,2).len()~ 10 | 11 | ]] 12 | ------------------------------------------ end of file Call arg type mismatch: __________________________________________ | | 'senpai.first()' called here 5 | b = a.first("").first(2,2).len()~ | ^^^^^ | | 'senpai.first()' class method expects 1 argument | EXPECTED ACTUAL ARG | ✗ chan senpai "" __________________________________________ Call arg type mismatch: __________________________________________ | | 'senpai.first()' called here 5 | b = a.first("").first(2,2).len()~ | ^^^^^ | | 'senpai.first()' class method expects 1 argument | EXPECTED ACTUAL ARG | ✓ chan chan 2 | | 1 arg too many | ✗ NONE ( 2 ) 2 __________________________________________ Call arg type mismatch: _______________________________ | | 'senpai.last()' called here 6 | b = a.last(2,2).len()~ | ^^^^ | | 'senpai.last()' class method expects 1 argument | EXPECTED ACTUAL ARG | ✓ chan chan 2 | | 1 arg too many | ✗ NONE ( 2 ) 2 _______________________________ Call arg type mismatch: _______________________________ | | 'senpai.upTo()' called here 7 | b = a.upTo(2,2).len()~ | ^^^^ | | 'senpai.upTo()' class method expects 1 argument | EXPECTED ACTUAL ARG | ✗ senpai chan 2 | | 1 arg too many | ✗ NONE ( 2 ) 2 _______________________________ Call arg type mismatch: _______________________________ | | 'senpai.from()' called here 8 | b = a.from(2,2).len()~ | ^^^^ | | 'senpai.from()' class method expects 1 argument | EXPECTED ACTUAL ARG | ✗ senpai chan 2 | | 1 arg too many | ✗ NONE ( 2 ) 2 _______________________________ Call arg type mismatch: ___________________________________ | | 'senpai.substr()' called here 9 | b = a.substr(2,2,2).len()~ | ^^^^^^ | | 'senpai.substr()' class method expects 2 arguments | EXPECTED ACTUAL ARG | ✓ chan chan 2 | ✓ chan chan 2 | | 1 arg too many | ✗ NONE ( 2 ) 2 ___________________________________
closes #246
new
etc
test log