Stan
2.14.0
probability, sampling & optimization
src
stan
lang
ast
fun
has_lp_suffix_def.hpp
Go to the documentation of this file.
1
#ifndef STAN_LANG_AST_FUN_HAS_LP_SUFFIX_DEF_HPP
2
#define STAN_LANG_AST_FUN_HAS_LP_SUFFIX_DEF_HPP
3
4
#include <
stan/lang/ast.hpp
>
5
#include <string>
6
7
namespace
stan
{
8
namespace
lang {
9
10
bool
has_lp_suffix
(
const
std::string& s) {
11
int
n = s.size();
12
return
n > 3
13
&& s[n-1] ==
'p'
14
&& s[n-2] ==
'l'
15
&& s[n-3] ==
'_'
;
16
}
17
18
}
19
}
20
#endif
stan::lang::has_lp_suffix
bool has_lp_suffix(const std::string &name)
Return true if the specified string has the suffix "_lp".
Definition:
has_lp_suffix_def.hpp:10
stan
Probability, optimization and sampling library.
Definition:
base_interrupt.hpp:4
ast.hpp
[
Stan Home Page
]
© 2011–2016, Stan Development Team.