diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-10-01 12:01:00 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-10-01 12:01:00 +0000 |
commit | 19ec25715ed9df4a57e553b255c736bcc9cd40ac (patch) | |
tree | f42440d3dad3440676d7158c41d234cac01a24a6 /perl_checker.src/common.ml | |
parent | dc9773c0e1ae4730e0b426239b432dff93e226be (diff) | |
download | perl_checker-19ec25715ed9df4a57e553b255c736bcc9cd40ac.tar perl_checker-19ec25715ed9df4a57e553b255c736bcc9cd40ac.tar.gz perl_checker-19ec25715ed9df4a57e553b255c736bcc9cd40ac.tar.bz2 perl_checker-19ec25715ed9df4a57e553b255c736bcc9cd40ac.tar.xz perl_checker-19ec25715ed9df4a57e553b255c736bcc9cd40ac.zip |
perfect warning for suggesting qq(...) instead of "..."
Diffstat (limited to 'perl_checker.src/common.ml')
-rw-r--r-- | perl_checker.src/common.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perl_checker.src/common.ml b/perl_checker.src/common.ml index e30dc20..554a65c 100644 --- a/perl_checker.src/common.ml +++ b/perl_checker.src/common.ml @@ -756,6 +756,13 @@ let count_chars_in_string s c = Not_found -> 0 in rec_count_chars_in_string 0 +let rec string_fold_left f val_ s = + let val_ = ref val_ in + for i = 0 to String.length s - 1 do + val_ := f !val_ s.[i] + done ; + !val_ + let rec string_forall_with f i s = try f s.[i] && string_forall_with f (i+1) s |