1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Use char overloads for string methods

This commit is contained in:
Berkan Diler 2020-10-16 11:52:29 +02:00
parent cc11283143
commit fe3a23750c
7 changed files with 7 additions and 7 deletions

View File

@ -98,7 +98,7 @@ namespace osu.Game.Beatmaps
[JsonIgnore]
public string StoredBookmarks
{
get => string.Join(",", Bookmarks);
get => string.Join(',', Bookmarks);
set
{
if (string.IsNullOrEmpty(value))

View File

@ -196,7 +196,7 @@ namespace osu.Game.Online.Chat
if (target == null)
return;
var parameters = text.Split(new[] { ' ' }, 2);
var parameters = text.Split(' ', 2);
string command = parameters[0];
string content = parameters.Length == 2 ? parameters[1] : string.Empty;

View File

@ -111,7 +111,7 @@ namespace osu.Game.Online.Chat
public static LinkDetails GetLinkDetails(string url)
{
var args = url.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
var args = url.Split('/', StringSplitOptions.RemoveEmptyEntries);
args[0] = args[0].TrimEnd(':');
switch (args[0])

View File

@ -148,7 +148,7 @@ namespace osu.Game.Overlays.Profile.Header
if (string.IsNullOrEmpty(content)) return false;
// newlines could be contained in API returned user content.
content = content.Replace("\n", " ");
content = content.Replace('\n', ' ');
bottomLinkContainer.AddIcon(icon, text =>
{

View File

@ -159,7 +159,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
{
string[] ss = split[5].Split(':');
endTime = Math.Max(startTime, Parsing.ParseDouble(ss[0]));
readCustomSampleBanks(string.Join(":", ss.Skip(1)), bankInfo);
readCustomSampleBanks(string.Join(':', ss.Skip(1)), bankInfo);
}
result = CreateHold(pos, combo, comboOffset, endTime + Offset - startTime);

View File

@ -18,6 +18,6 @@ namespace osu.Game.Skinning
protected virtual string ComponentName => Component.ToString();
public string LookupName =>
string.Join("/", new[] { "Gameplay", RulesetPrefix, ComponentName }.Where(s => !string.IsNullOrEmpty(s)));
string.Join('/', new[] { "Gameplay", RulesetPrefix, ComponentName }.Where(s => !string.IsNullOrEmpty(s)));
}
}

View File

@ -17,6 +17,6 @@ namespace osu.Game.Skinning
protected virtual string ComponentName => Component.ToString();
public string LookupName =>
string.Join("/", new[] { "HUD", ComponentName }.Where(s => !string.IsNullOrEmpty(s)));
string.Join('/', new[] { "HUD", ComponentName }.Where(s => !string.IsNullOrEmpty(s)));
}
}