aboutsummaryrefslogtreecommitdiff
path: root/challenge-331/conor-hoekstra/bqn/ch-1.bqn
blob: 09610d238411908ea615700b1dbc66db14bdc1de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# For up to date code:
# https://github.com/codereport/bqn-code/blob/main/pwc/331-1.bqn

u  •Import "/home/cph/bqn-test/test.bqn"
s  •Import "/home/cph/bqn-code/lib/string.bqn"

LastWordLength  ·´s.Words

# Tests
u.UnitTest (LastWordLength "The Weekly Challenge")  9
u.UnitTest (LastWordLength "   Hello   World    ")  5
u.UnitTest (LastWordLength "Let's begin the fun")  3