mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Use char overloads for string methods
This commit is contained in:
parent
cc11283143
commit
fe3a23750c
@ -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))
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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])
|
||||
|
@ -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 =>
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user