mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Use char overloads for string methods
This commit is contained in:
@ -98,7 +98,7 @@ namespace osu.Game.Beatmaps
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string StoredBookmarks
|
public string StoredBookmarks
|
||||||
{
|
{
|
||||||
get => string.Join(",", Bookmarks);
|
get => string.Join(',', Bookmarks);
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(value))
|
if (string.IsNullOrEmpty(value))
|
||||||
|
@ -196,7 +196,7 @@ namespace osu.Game.Online.Chat
|
|||||||
if (target == null)
|
if (target == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var parameters = text.Split(new[] { ' ' }, 2);
|
var parameters = text.Split(' ', 2);
|
||||||
string command = parameters[0];
|
string command = parameters[0];
|
||||||
string content = parameters.Length == 2 ? parameters[1] : string.Empty;
|
string content = parameters.Length == 2 ? parameters[1] : string.Empty;
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ namespace osu.Game.Online.Chat
|
|||||||
|
|
||||||
public static LinkDetails GetLinkDetails(string url)
|
public static LinkDetails GetLinkDetails(string url)
|
||||||
{
|
{
|
||||||
var args = url.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
|
var args = url.Split('/', StringSplitOptions.RemoveEmptyEntries);
|
||||||
args[0] = args[0].TrimEnd(':');
|
args[0] = args[0].TrimEnd(':');
|
||||||
|
|
||||||
switch (args[0])
|
switch (args[0])
|
||||||
|
@ -148,7 +148,7 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
if (string.IsNullOrEmpty(content)) return false;
|
if (string.IsNullOrEmpty(content)) return false;
|
||||||
|
|
||||||
// newlines could be contained in API returned user content.
|
// newlines could be contained in API returned user content.
|
||||||
content = content.Replace("\n", " ");
|
content = content.Replace('\n', ' ');
|
||||||
|
|
||||||
bottomLinkContainer.AddIcon(icon, text =>
|
bottomLinkContainer.AddIcon(icon, text =>
|
||||||
{
|
{
|
||||||
|
@ -159,7 +159,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
|||||||
{
|
{
|
||||||
string[] ss = split[5].Split(':');
|
string[] ss = split[5].Split(':');
|
||||||
endTime = Math.Max(startTime, Parsing.ParseDouble(ss[0]));
|
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);
|
result = CreateHold(pos, combo, comboOffset, endTime + Offset - startTime);
|
||||||
|
@ -18,6 +18,6 @@ namespace osu.Game.Skinning
|
|||||||
protected virtual string ComponentName => Component.ToString();
|
protected virtual string ComponentName => Component.ToString();
|
||||||
|
|
||||||
public string LookupName =>
|
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();
|
protected virtual string ComponentName => Component.ToString();
|
||||||
|
|
||||||
public string LookupName =>
|
public string LookupName =>
|
||||||
string.Join("/", new[] { "HUD", ComponentName }.Where(s => !string.IsNullOrEmpty(s)));
|
string.Join('/', new[] { "HUD", ComponentName }.Where(s => !string.IsNullOrEmpty(s)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user