Repository: PowerShell/PowerShell
File: src/Microsoft.PowerShell.Commands.Utility/commands/utility/Join-String.cs (C#)

Code before:
                        {
                            _outputBuilder.AppendFormat(_cultureInfo, FormatString, inputValue);
                        }
                    }
                }
            }
        }

        /// <inheritdoc/>
        protected override void EndProcessing()
        {
            _outputBuilder.Append(OutputSuffix);
            WriteObject(_outputBuilder.ToString());
        }
    }

    /// <summary>
    /// Provides completion for the Separator parameter of the Join-String cmdlet.
    /// </summary>
    public class SeparatorArgumentCompleter : IArgumentCompleter
    {
        private static readonly string NewLineText =
#if UNIX
    "`n";
#else
    "`r`n";
#endif

        private static readonly IReadOnlyList<string> s_separatorValues = new List<string>
        {
            ",",
            ", ",
            ";",
            "; ",
            NewLineText,
            "-",
            " ",
        };

        private static readonly Dictionary<string, (string Tooltip, string ListItemText)> s_separatorMappings = new()
        {
            { ",", (TabCompletionStrings.SeparatorCommaToolTip, "Comma") },
            { ", ", (TabCompletionStrings.SeparatorCommaSpaceToolTip, "Comma-Space") },
            { ";", (TabCompletionStrings.SeparatorSemiColonToolTip, "Semi-Colon") },
            { "; ", (TabCompletionStrings.SeparatorSemiColonSpaceToolTip, "Semi-Colon-Space") },
            { NewLineText, (StringUtil.Format(TabCompletionStrings.SeparatorNewlineToolTip, NewLineText), "Newline") },
            { "-", (TabCompletionStrings.SeparatorDashToolTip, "Dash") },
            { " ", (TabCompletionStrings.SeparatorSpaceToolTip, "Space") },
        };

        private static string GetSeparatorToolTip(string separator)

Review comment (suggestion):
```suggestion
        private static readonly string NewLineText =
#if UNIX
        "`n";
#else
        "`r`n";
```

Code after:
                        {
                            _outputBuilder.AppendFormat(_cultureInfo, FormatString, inputValue);
                        }
                    }
                }
            }
        }

        /// <inheritdoc/>
        protected override void EndProcessing()
        {
            _outputBuilder.Append(OutputSuffix);
            WriteObject(_outputBuilder.ToString());
        }
    }

    /// <summary>
    /// Provides completion for the Separator parameter of the Join-String cmdlet.
    /// </summary>
    public sealed class SeparatorArgumentCompleter : IArgumentCompleter
    {
        private static readonly string NewLineText =
#if UNIX
        "`n";
#else
        "`r`n";
#endif

        private static readonly Dictionary<string, (string Tooltip, string ListItemText)> s_separatorMappings = new(capacity: 7)
        {
            { ",", (TabCompletionStrings.SeparatorCommaToolTip, "Comma") },
            { ", ", (TabCompletionStrings.SeparatorCommaSpaceToolTip, "Comma-Space") },
            { ";", (TabCompletionStrings.SeparatorSemiColonToolTip, "Semi-Colon") },
            { "; ", (TabCompletionStrings.SeparatorSemiColonSpaceToolTip, "Semi-Colon-Space") },
            { NewLineText, (StringUtil.Format(TabCompletionStrings.SeparatorNewlineToolTip, NewLineText), "Newline") },
            { "-", (TabCompletionStrings.SeparatorDashToolTip, "Dash") },
            { " ", (TabCompletionStrings.SeparatorSpaceToolTip, "Space") },
        };

        private static readonly IEnumerable<string> s_separatorValues = s_separatorMappings.Keys;

        private static string GetSeparatorToolTip(string separator)
            => s_separatorMappings.TryGetValue(separator, out var mapping)
                ? mapping.Tooltip
                : separator;

        private static string GetSeparatorListItemText(string separator)
            => s_separatorMappings.TryGetValue(separator, out var mapping)
                ? mapping.ListItemText
                : separator;