Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stub for phone-number exercise #142

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions exercises/practice/phone-number/phone-number.wat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(module
(memory (export "mem") 1)

;;
;; Clean up user-entered phone number
;;
;; @param {i32} textOffset - The offset of the input string in linear memory
;; @param {i32} textLength - The length of the input string in linear memory
;;
;; @returns {(i32,i32)} - The offset and length of the clean phone number in linear memory
;;
(func (export "clean") (param $textOffset i32) (param $textLength i32) (result i32 i32)
(return (local.get $textOffset) (local.get $textLength))
)
)