Skip to content

Instantly share code, notes, and snippets.

@commy2
Last active May 9, 2021 11:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save commy2/fe39a22d4b3befcc2a02576223d9277d to your computer and use it in GitHub Desktop.
Save commy2/fe39a22d4b3befcc2a02576223d9277d to your computer and use it in GitHub Desktop.

rfind

#define RFIND(h,n) (call {\
    private _offset = count (h) - count (n);\
    private _index = _offset - (reverse (h) find reverse (n));\
    [_index, -1] select (_index > _offset)\
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment