From 7a906c48fbc3053eb8f9ca7813be8f3cbf025a5b Mon Sep 17 00:00:00 2001 From: sonots Date: Sat, 21 Oct 2017 10:33:25 +0000 Subject: * string.c (deleted_prefix_length, deleted_suffix_length): Add doxygen comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'string.c') diff --git a/string.c b/string.c index bea38df4bc..604304fda2 100644 --- a/string.c +++ b/string.c @@ -8293,6 +8293,11 @@ chompped_length(VALUE str, VALUE rs) return len; } +/*! + * Returns the seperator for arguments of rb_str_chomp. + * + * @return returns rb_ps ($/) as default, the default value of rb_ps ($/) is "\n". + */ static VALUE chomp_rs(int argc, const VALUE *argv) { @@ -9273,6 +9278,15 @@ rb_str_end_with(int argc, VALUE *argv, VALUE str) return Qfalse; } +/*! + * Returns the length of the prefix to be deleted in the given str, + * returning 0 if str does not start with the prefix. + * + * @param str the target + * @param prefix the prefix + * @retval 0 if the given str does not start with the given prefix + * @retval Positive-Integer otherwise + */ static long deleted_prefix_length(VALUE str, VALUE prefix) { @@ -9339,6 +9353,15 @@ rb_str_delete_prefix(VALUE str, VALUE prefix) return rb_str_subseq(str, prefixlen, RSTRING_LEN(str) - prefixlen); } +/*! + * Returns the length of the suffix to be deleted in the given str, + * returning 0 if str does not end with the suffix. + * + * @param str the target + * @param suffix the suffix + * @retval 0 if the given str does not end with the given suffix + * @retval Positive-Integer otherwise + */ static long deleted_suffix_length(VALUE str, VALUE suffix) { -- cgit v1.2.3