summaryrefslogtreecommitdiffstats
path: root/src/common.ml
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-01-22 17:38:23 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-01-25 18:57:12 +0100
commit851d8df9ad31c7e0c169ce49dba8d7e88a162a3d (patch)
tree0c4098227de9cd4b2814dc0ac39276d70d071dfe /src/common.ml
parent216352f6bb07ddf629da2b71d9395c2e0a974b70 (diff)
downloadperl_checker-851d8df9ad31c7e0c169ce49dba8d7e88a162a3d.tar
perl_checker-851d8df9ad31c7e0c169ce49dba8d7e88a162a3d.tar.gz
perl_checker-851d8df9ad31c7e0c169ce49dba8d7e88a162a3d.tar.bz2
perl_checker-851d8df9ad31c7e0c169ce49dba8d7e88a162a3d.tar.xz
perl_checker-851d8df9ad31c7e0c169ce49dba8d7e88a162a3d.zip
adjust to immutable/safe strings vs bytes split
it was possible to fix to_CamelCase but it was actually unused...
Diffstat (limited to 'src/common.ml')
-rw-r--r--src/common.ml15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/common.ml b/src/common.ml
index dd2f6b1..04225f9 100644
--- a/src/common.ml
+++ b/src/common.ml
@@ -829,21 +829,6 @@ let words s =
in
collect (words_ [] 0) (split_at '\n' s)
-let to_CamelCase s_ =
- let l = ref [] in
- let s = String.copy s_ in
- for i = 1 to String.length s - 1 do
- if is_uppercase (String.unsafe_get s i) && is_lowercase (String.unsafe_get s (i-1)) then (
- String.set s i (Char.lowercase (String.get s i)) ;
- l := i :: !l
- )
- done ;
- if !l = [] then None else
- let offset, s' = fold_left (fun (offset, s') i ->
- i, s' ^ String.sub s offset (i-offset) ^ "_"
- ) (0, "") (rev !l) in
- Some (s' ^ String.sub s offset (String.length s - offset))
-
let concat_symlink file link =
if str_begins_with "..//" link then (* ..//foo => /foo *)
skip_n_char 3 link