summaryrefslogtreecommitdiff
path: root/core/variant_call.cpp
diff options
context:
space:
mode:
authorZher Huei Lee <lee.zh.92@gmail.com>2017-10-11 16:27:54 +0800
committerZher Huei Lee <lee.zh.92@gmail.com>2017-11-01 07:20:20 +0800
commit0804dd53364107001f31948a9ec9fe331bc92a4a (patch)
treeb40719054bdae31832e870a17d88ab7a20ff8ba9 /core/variant_call.cpp
parent29ea79e065cb1ecffec6b8ad17d9996f21abf1cb (diff)
Added String::dedent() to remove text indentation
This functions similarly to Python's textwrap.dedent() It's also been applied to doc_data.cpp to remove extra whitespace while parsing the XML.
Diffstat (limited to 'core/variant_call.cpp')
-rw-r--r--core/variant_call.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index cdf1ea46a3..1a29b92810 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -260,6 +260,7 @@ struct _VariantCall {
VCALL_LOCALMEM0R(String, to_lower);
VCALL_LOCALMEM1R(String, left);
VCALL_LOCALMEM1R(String, right);
+ VCALL_LOCALMEM0R(String, dedent);
VCALL_LOCALMEM2R(String, strip_edges);
VCALL_LOCALMEM0R(String, get_extension);
VCALL_LOCALMEM0R(String, get_basename);
@@ -1457,6 +1458,7 @@ void register_variant_methods() {
ADDFUNC0R(STRING, STRING, String, get_basename, varray());
ADDFUNC1R(STRING, STRING, String, plus_file, STRING, "file", varray());
ADDFUNC1R(STRING, INT, String, ord_at, INT, "at", varray());
+ ADDFUNC0(STRING, STRING, String, dedent, varray());
ADDFUNC2(STRING, NIL, String, erase, INT, "position", INT, "chars", varray());
ADDFUNC0R(STRING, INT, String, hash, varray());
ADDFUNC0R(STRING, STRING, String, md5_text, varray());