Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit d630eac

Browse files
committed
Add AppendUrlPathsRaw - like AppendUrlPaths but doesn't encode its parts
1 parent e57f080 commit d630eac

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/ServiceStack.Text/StringExtensions.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,19 @@ public static string AppendUrlPaths(this string uri, params string[] uriComponen
314314
}
315315
return sb.ToString();
316316
}
317+
318+
public static string AppendUrlPathsRaw(this string uri, params string[] uriComponents)
319+
{
320+
var sb = new StringBuilder(uri.WithTrailingSlash());
321+
var i = 0;
322+
foreach (var uriComponent in uriComponents)
323+
{
324+
if (i++ > 0) sb.Append('/');
325+
sb.Append(uriComponent);
326+
}
327+
return sb.ToString();
328+
}
329+
317330
#if !SILVERLIGHT
318331
public static string FromAsciiBytes(this byte[] bytes)
319332
{

0 commit comments

Comments
 (0)