diff options
Diffstat (limited to 'c++-mode/srn')
-rw-r--r-- | c++-mode/srn | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/c++-mode/srn b/c++-mode/srn new file mode 100644 index 0000000..1fca802 --- /dev/null +++ b/c++-mode/srn @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: search_n +# key: srn +# contributor: Tommy BENNETT and Ludwig PACIFICI <ludwig@lud.cc> +# -- +auto pos = std::search_n(std::begin(${1:container}), std::end($1),$2,$3); +if (pos != std::end($1)) { + $4 +} +$0 |