Skip to content

Commit d7c95e0

Browse files
committed
Make concatArray local to String.concat
1 parent 53a235e commit d7c95e0

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/fsharp/FSharp.Core/string.fs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ namespace Microsoft.FSharp.Core
1616
[<CompiledName("Length")>]
1717
let length (str:string) = if isNull str then 0 else str.Length
1818

19-
let private concatArray sep (strings: string []) =
20-
match length sep with
21-
| 0 -> String.Concat strings
22-
// following line should be used when this overload becomes part of .NET Standard (it's only in .NET Core)
23-
//| 1 -> String.Join(sep.[0], strings, 0, strings.Length)
24-
| _ -> String.Join(sep, strings, 0, strings.Length)
25-
2619
[<CompiledName("Concat")>]
2720
let concat sep (strings : seq<string>) =
21+
22+
let concatArray sep (strings: string []) =
23+
match length sep with
24+
| 0 -> String.Concat strings
25+
// following line should be used when this overload becomes part of .NET Standard (it's only in .NET Core)
26+
//| 1 -> String.Join(sep.[0], strings, 0, strings.Length)
27+
| _ -> String.Join(sep, strings, 0, strings.Length)
28+
2829
match strings with
2930
| :? array<string> as arr ->
3031
concatArray sep arr

0 commit comments

Comments
 (0)