Last but one
Posted: Mon Sep 02, 2019 1:42 pm
So, here I am trying to analyse a whopping-great text for words with certain
suffixes (= bits that go on the end of words) . . .
Now, it is dead easy to analyse texts for prefixes (= bits that go on the front of words)
using a series of nested loops for char 1, char, char 3 and so on . . .
Now I can ask questions about the last char of a word . . .
But, short of popping that word into a variable and nipping characters of the end
sequentially it seems "a bit of a pain" as I cannot do this sort of thing . . .
pseudoCode
last char
(last -1) char
(last -2) char
nicht?
suffixes (= bits that go on the end of words) . . .
Now, it is dead easy to analyse texts for prefixes (= bits that go on the front of words)
using a series of nested loops for char 1, char, char 3 and so on . . .
Now I can ask questions about the last char of a word . . .
But, short of popping that word into a variable and nipping characters of the end
sequentially it seems "a bit of a pain" as I cannot do this sort of thing . . .
pseudoCode
last char
(last -1) char
(last -2) char
nicht?