From 0804dd53364107001f31948a9ec9fe331bc92a4a Mon Sep 17 00:00:00 2001 From: Zher Huei Lee Date: Wed, 11 Oct 2017 16:27:54 +0800 Subject: 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. --- core/variant_call.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/variant_call.cpp') 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()); -- cgit v1.2.3