Merge branch 'develop' into #268/c++20

This commit is contained in:
Louis Rubet 2022-09-22 10:51:50 +02:00 committed by GitHub
commit 5f4d0d7d0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 0 deletions

View file

@ -223,6 +223,7 @@ class Program : public deque<Object*>, public Lexer, public Object {
void RpnStrsize();
void RpnStrpos();
void RpnStrsub();
void RpnEndl();
// test-core
void RpnTest();

View file

@ -94,3 +94,9 @@ void Program::RpnStrsub() {
stack_.push(new String(stack_.value<String>(2).substr(first, len)));
stack_.erase(1, 3);
}
/// @brief endline character
///
void Program::RpnEndl() {
stack_.push_front(new String("\n"));
}

View file

@ -305,3 +305,15 @@
-> stack should be "sub"
`del`
## endl 1
`endl type`
-> stack should be "string"
`del`
## endl 2
`endl num`
-> stack should be 10