diff options
author | Josh Stone <jistone@redhat.com> | 2010-03-11 19:19:33 -0800 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2010-03-11 19:19:33 -0800 |
commit | 60d985370e63cb3b4c68489fc54276d8ac2b921b (patch) | |
tree | 2731ffe47f8e619b6fabcacf451275d49a3486fd /tapset-mark.cxx | |
parent | 0da46fcdec144f944838350f08f59a36b8709e90 (diff) | |
download | systemtap-steved-60d985370e63cb3b4c68489fc54276d8ac2b921b.tar.gz systemtap-steved-60d985370e63cb3b4c68489fc54276d8ac2b921b.tar.xz systemtap-steved-60d985370e63cb3b4c68489fc54276d8ac2b921b.zip |
Add startswith/endswith helpers
Inspired by the Python equivalents, these new utility functions just
make it a little cleaner to match at the beginning or end of a string.
Diffstat (limited to 'tapset-mark.cxx')
-rw-r--r-- | tapset-mark.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tapset-mark.cxx b/tapset-mark.cxx index 5c5fb0ce..c672dc7a 100644 --- a/tapset-mark.cxx +++ b/tapset-mark.cxx @@ -187,7 +187,7 @@ mark_var_expanding_visitor::visit_target_symbol (target_symbol* e) if (e->addressof) throw semantic_error("cannot take address of marker variable", e->tok); - if (e->base_name.substr(0,4) == "$arg") + if (startswith(e->base_name, "$arg")) visit_target_symbol_arg (e); else if (e->base_name == "$format" || e->base_name == "$name" || e->base_name == "$$parms" || e->base_name == "$$vars") |