|
Blender V5.3
|
#include <NOD_string_pattern.hh>
Public Member Functions | |
| bool | match (StringRef query) const |
| std::optional< StringRef > | exact_pattern () const |
| StringRef | full_pattern () const |
Static Public Member Functions | |
| static std::optional< StringPattern > | from_str (StringPatternMode mode, StringRef pattern, std::string &r_error) |
A predicate for strings. A pattern can be created and then other strings can be tested against it.
Definition at line 30 of file NOD_string_pattern.hh.
|
inline |
Sometimes things can be implemented more efficiently when there is an exact pattern.
Definition at line 73 of file NOD_string_pattern.hh.
Referenced by blender::nodes::node_geo_remove_attribute_cc::node_geo_exec(), and blender::nodes::node_geo_remove_attribute_cc::remove_attributes().
|
static |
Create a new pattern. If the pattern is invalid, nullopt is returned and the error message is set.
Definition at line 30 of file string_pattern.cc.
References blender::blender::StringRefBase::data(), blender::nodes::Exact, blender::blender::StringRefBase::find(), blender::blender::StringRefBase::size(), blender::Span< T >::Span(), blender::StringRef::StringRef(), blender::blender::StringRefBase::substr(), TIP_, and blender::nodes::Wildcard.
Referenced by blender::nodes::node_geo_get_nested_bundle_paths_cc::node_geo_exec(), blender::nodes::node_geo_remove_attribute_cc::node_geo_exec(), and blender::nodes::node_geo_transfer_attributes_cc::node_geo_exec().
|
inline |
Definition at line 81 of file NOD_string_pattern.hh.
| bool blender::nodes::StringPattern::match | ( | StringRef | query | ) | const |
Returns true if the string matches the pattern.
Definition at line 57 of file string_pattern.cc.
Referenced by blender::nodes::node_geo_remove_attribute_cc::remove_attributes(), and blender::nodes::node_geo_transfer_attributes_cc::should_transfer().