From b6280cee3cb147baa604e8d1fa9408fa68b9dc24 Mon Sep 17 00:00:00 2001 From: Eric Willigers Date: Sun, 5 Jan 2025 16:18:19 +1100 Subject: [PATCH] Stub for phone-number exercise 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)) + ) +)