add overloads (dotnet/coreclr#18458)
authorMarco Rossignoli <marco.rossignoli@gmail.com>
Thu, 14 Jun 2018 17:30:56 +0000 (19:30 +0200)
committerStephen Toub <stoub@microsoft.com>
Thu, 14 Jun 2018 17:30:56 +0000 (13:30 -0400)
Commit migrated from https://github.com/dotnet/coreclr/commit/5b230860900aab1c4023e729c33006b1b09107f8

src/libraries/System.Private.CoreLib/src/System/IO/Path.cs

index 1e40ab5..ec9b1b3 100644 (file)
@@ -409,6 +409,16 @@ namespace System.IO
             return JoinInternal(path1, path2, path3);
         }
 
+        public static string Join(string path1, string path2)
+        {
+            return Join(path1.AsSpan(), path2.AsSpan());
+        }
+
+        public static string Join(string path1, string path2, string path3)
+        {
+            return Join(path1.AsSpan(), path2.AsSpan(), path3.AsSpan());
+        }
+
         public static bool TryJoin(ReadOnlySpan<char> path1, ReadOnlySpan<char> path2, Span<char> destination, out int charsWritten)
         {
             charsWritten = 0;