Contextual alternative end of word syntax

Hey,
I am pretty new to Glyphs and I’m trying my first steps in alternatives. I want to make a style set with longs and since there are some conventions about its use, I made some substitutions (f.e. that only the first of two s is a longs).

They also work fine, except I don’t know what to do with the end of words.
I made a class with all characters that indicate ends of words, most importantly space.
But since it’s a very display-ish font I know that it’s mostly going to be used for headlines, which mostly don’t use any punctuation and cut the last space.
How is the syntax for the last character in a given text (in my case that s)?

This isn’t accurate, double long s also occurs. It’s at the end of words that only the first s is long.

There is no syntax for “last character of word”, sadly. You could (but shouldn’t) hijack the fina feature, which is intended for Arabic.

The fina feature is only supposed to be use with Arabic. But this Features, part 4: positional alternates | Glyphs explains a workaround (using ignore sub).

Not the job of an OT feature. Perhaps that of a layout engine.