wasSharp – Diff between revs 26 and 27
?pathlinks?
Rev 26 | Rev 27 | |||
---|---|---|---|---|
Line 2... | Line 2... | |||
2 | // Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3 // |
2 | // Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3 // |
|
3 | // Please see: http://www.gnu.org/licenses/gpl.html for legal details, // |
3 | // Please see: http://www.gnu.org/licenses/gpl.html for legal details, // |
|
4 | // rights of fair usage, the disclaimer and warranty conditions. // |
4 | // rights of fair usage, the disclaimer and warranty conditions. // |
|
5 | /////////////////////////////////////////////////////////////////////////// |
5 | /////////////////////////////////////////////////////////////////////////// |
|
Line 6... | Line -... | |||
6 | |
- | ||
7 | using System; |
6 | |
|
8 | using System.IO; |
7 | using System.IO; |
|
Line 9... | Line 8... | |||
9 | using System.Linq; |
8 | using System.Linq; |
|
10 | |
9 | |
|
Line 22... | Line 21... | |||
22 | /// <returns>a combined path</returns> |
21 | /// <returns>a combined path</returns> |
|
23 | public static string PathCombine(params string[] paths) |
22 | public static string PathCombine(params string[] paths) |
|
24 | { |
23 | { |
|
25 | return paths.Aggregate((x, y) => Path.Combine(x, y)); |
24 | return paths.Aggregate((x, y) => Path.Combine(x, y)); |
|
26 | } |
25 | } |
|
27 | |
- | ||
28 | /////////////////////////////////////////////////////////////////////////// |
- | ||
29 | // Copyright (C) 2016 Wizardry and Steamworks - License: GNU GPLv3 // |
- | ||
30 | /////////////////////////////////////////////////////////////////////////// |
- | ||
31 | /// <summary> |
- | ||
32 | /// Determines if two strings are equal. |
- | ||
33 | /// </summary> |
- | ||
34 | /// <param name="a">first string</param> |
- | ||
35 | /// <param name="b">second string</param> |
- | ||
36 | /// <param name="comparison">string comparison to use</param> |
- | ||
37 | /// <returns>true if the strings are equal</returns> |
- | ||
38 | public static bool Equals(string a, string b, StringComparison comparison) |
- | ||
39 | { |
- | ||
40 | return (a == null && b == null) || (a.Length == b.Length && string.Equals(a, b, comparison)); |
- | ||
41 | } |
- | ||
42 | |
- | ||
43 | /////////////////////////////////////////////////////////////////////////// |
- | ||
44 | // Copyright (C) 2016 Wizardry and Steamworks - License: GNU GPLv3 // |
- | ||
45 | /////////////////////////////////////////////////////////////////////////// |
- | ||
46 | /// <summary> |
- | ||
47 | /// Determines if two strings are equal. |
- | ||
48 | /// </summary> |
- | ||
49 | /// <param name="a">first string</param> |
- | ||
50 | /// <param name="b">second string</param> |
- | ||
51 | /// <returns>true if the strings are equal</returns> |
- | ||
52 | public static bool Equals(string a, string b) |
- | ||
53 | { |
- | ||
54 | return (a == null && b == null) || (a != null && b != null && a.Length == b.Length && string.Equals(a, b)); |
- | ||
55 | } |
- | ||
56 | } |
26 | } |
|
57 | } |
- | ||
58 | |
27 | } |
|
- | 28 | |