| | | 1 | | using System.Diagnostics.CodeAnalysis; |
| | | 2 | | |
| | | 3 | | namespace Plainquire.Sort; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Extension methods for <see cref="string"/>. |
| | | 7 | | /// </summary> |
| | | 8 | | internal static class StringExtensions |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// Lower-cases the first character. |
| | | 12 | | /// </summary> |
| | | 13 | | /// <param name="value">The value.</param> |
| | | 14 | | [return: NotNullIfNotNull(nameof(value))] |
| | | 15 | | public static string? LowercaseFirstChar(this string? value) |
| | 282 | 16 | | => !string.IsNullOrEmpty(value) |
| | 282 | 17 | | ? char.ToLowerInvariant(value[0]) + value[1..] |
| | 282 | 18 | | : value; |
| | | 19 | | } |