Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit 60cf834c authored by Johannes Kanig's avatar Johannes Kanig Committed by David Hauzar

OA26-022 move string utility function to string utility module

parent 5c3038bf
...@@ -194,12 +194,6 @@ let () = Trans.register_transform "intro_vc_vars_counterexmp" ...@@ -194,12 +194,6 @@ let () = Trans.register_transform "intro_vc_vars_counterexmp"
intro_vc_vars_counterexmp intro_vc_vars_counterexmp
~desc:"Introduce." ~desc:"Introduce."
let rec string_join sep l =
match l with
| [] -> ""
| [x] -> x
| x :: rest -> x ^ sep ^ string_join sep rest
let get_location_of_vc task = let get_location_of_vc task =
let meta_args = Task.on_meta_excl meta_vc_location task in let meta_args = Task.on_meta_excl meta_vc_location task in
match meta_args with match meta_args with
...@@ -214,7 +208,7 @@ let get_location_of_vc task = ...@@ -214,7 +208,7 @@ let get_location_of_vc task =
let line = int_of_string line in let line = int_of_string line in
let col1 = int_of_string col1 in let col1 = int_of_string col1 in
let col2 = int_of_string col2 in let col2 = int_of_string col2 in
let filename = string_join ":" (List.rev rest) in let filename = Strings.join ":" (List.rev rest) in
Some (Loc.user_position filename line col1 col2) Some (Loc.user_position filename line col1 col2)
| _ -> None in | _ -> None in
loc loc
......
...@@ -39,6 +39,12 @@ let rev_bounded_split c s n = ...@@ -39,6 +39,12 @@ let rev_bounded_split c s n =
let bounded_split c s n = List.rev (rev_bounded_split c s n) let bounded_split c s n = List.rev (rev_bounded_split c s n)
let rec join sep l =
match l with
| [] -> ""
| [x] -> x
| x :: rest -> x ^ sep ^ join sep rest
let ends_with s suf = let ends_with s suf =
let rec aux s suf suflen offset i = let rec aux s suf suflen offset i =
i >= suflen || (s.[i + offset] = suf.[i] i >= suflen || (s.[i + offset] = suf.[i]
......
...@@ -32,6 +32,10 @@ val bounded_split : char -> string -> int -> string list ...@@ -32,6 +32,10 @@ val bounded_split : char -> string -> int -> string list
[n] substring at most. [n] substring at most.
The concatenation of returned substrings is equal to the string s.*) The concatenation of returned substrings is equal to the string s.*)
val join : string -> string list -> string
(** [join sep l] joins all the strings in [l] together, in the same
order, separating them by [sep] *)
val ends_with : string -> string -> bool val ends_with : string -> string -> bool
(** test if a string ends with another *) (** test if a string ends with another *)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment