From 9ff44b13b22e0b327463e7772a4f7e06bcaa3c73 Mon Sep 17 00:00:00 2001 From: keiravillekode Date: Mon, 6 Jan 2025 08:14:26 +1100 Subject: [PATCH] Stub for phone-number exercise (#142) resolves #138 --- exercises/practice/phone-number/phone-number.wat | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/exercises/practice/phone-number/phone-number.wat b/exercises/practice/phone-number/phone-number.wat index e69de29..a9f6bf5 100644 --- a/exercises/practice/phone-number/phone-number.wat +++ b/exercises/practice/phone-number/phone-number.wat @@ -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)) + ) +)