diff --git a/src/cdomain/value/cdomains/addressDomain.ml b/src/cdomain/value/cdomains/addressDomain.ml index 55b1aceefc..263c1033bb 100644 --- a/src/cdomain/value/cdomains/addressDomain.ml +++ b/src/cdomain/value/cdomains/addressDomain.ml @@ -277,7 +277,7 @@ struct let compute_substring s1 s2 = try let i = Str.search_forward (Str.regexp_string s2) s1 0 in - Some (String.sub s1 i (String.length s1 - i)) + Some (Str.string_after s1 i) with Not_found -> None in (* if any of the input address sets contains an element that isn't a StrPtr, return top *) diff --git a/src/cdomain/value/cdomains/stringDomain.ml b/src/cdomain/value/cdomains/stringDomain.ml index 0621f37eb6..2b968b0321 100644 --- a/src/cdomain/value/cdomains/stringDomain.ml +++ b/src/cdomain/value/cdomains/stringDomain.ml @@ -62,7 +62,7 @@ let to_n_c_string n x = else if n < 0 then None else - Some (String.sub x 0 n) + Some (Str.first_chars x n) | None -> None let to_string_length x = diff --git a/src/cdomains/apron/affineEqualityDomain.apron.ml b/src/cdomains/apron/affineEqualityDomain.apron.ml index 55937a323d..f6232d95e6 100644 --- a/src/cdomains/apron/affineEqualityDomain.apron.ml +++ b/src/cdomains/apron/affineEqualityDomain.apron.ml @@ -282,7 +282,7 @@ struct let res = (String.concat "" @@ Array.to_list @@ Array.map dim_to_str vars) ^ (const_to_str arr.(Array.length arr - 1)) ^ "=0" in if String.starts_with res "+" then - String.sub res 1 (String.length res - 1) + Str.string_after res 1 else res in diff --git a/src/config/gobConfig.ml b/src/config/gobConfig.ml index 24a1701ce6..16b5511717 100644 --- a/src/config/gobConfig.ml +++ b/src/config/gobConfig.ml @@ -140,7 +140,7 @@ struct let rec split' i = if i