wes d2a2ba9e15 first commit %!s(int64=4) %!d(string=hai) anos
..
README.md d2a2ba9e15 first commit %!s(int64=4) %!d(string=hai) anos
code.cpp d2a2ba9e15 first commit %!s(int64=4) %!d(string=hai) anos
unitTest.cpp d2a2ba9e15 first commit %!s(int64=4) %!d(string=hai) anos

README.md

Recursion: Length of a String

by Matt tags: recursion, strings, language_fundamentals

Summary

Write a function that returns the length of a string. Make your function recursive. Examples length("apple") ➞ 5 length("make") ➞ 4 length("a") ➞ 1 length("") ➞ 0 Notes Check the Resources tab for info on recursion.

Instructions

Write a function that returns the length of a string. Make your function recursive.

Examples

length("apple") ➞ 5

length("make") ➞ 4

length("a") ➞ 1

length("") ➞ 0

Notes

Check the Resources tab for info on recursion.