mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
use some shared char arrays on string split
This commit is contained in:
@@ -15260,7 +15260,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
private string Name2Username(string name)
|
||||
{
|
||||
string[] parts = name.Split(new char[] {' '});
|
||||
string[] parts = name.Split();
|
||||
if (parts.Length < 2)
|
||||
return name.ToLower();
|
||||
if (parts[1].Equals("Resident"))
|
||||
|
||||
@@ -359,7 +359,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
bool error = false;
|
||||
if (!string.IsNullOrWhiteSpace(ownerPerm))
|
||||
{
|
||||
ids = ownerPerm.Split(new char[] {','});
|
||||
ids = ownerPerm.Split(Util.SplitCommaArray);
|
||||
foreach (string id in ids)
|
||||
{
|
||||
string current = id.Trim();
|
||||
@@ -415,7 +415,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
error = false;
|
||||
if (!string.IsNullOrWhiteSpace(creatorPerm))
|
||||
{
|
||||
ids = creatorPerm.Split(new char[] {','});
|
||||
ids = creatorPerm.Split(Util.SplitCommaArray);
|
||||
foreach (string id in ids)
|
||||
{
|
||||
string current = id.Trim();
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
{
|
||||
str = str.Replace('<', ' ');
|
||||
str = str.Replace('>', ' ');
|
||||
string[] tmps = str.Split(new Char[] {','});
|
||||
string[] tmps = str.Split(Util.SplitCommaArray);
|
||||
if (tmps.Length < 3)
|
||||
{
|
||||
z = y = x = 0;
|
||||
@@ -427,7 +427,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
{
|
||||
str = str.Replace('<', ' ');
|
||||
str = str.Replace('>', ' ');
|
||||
string[] tmps = str.Split(new Char[] {','});
|
||||
string[] tmps = str.Split(Util.SplitCommaArray);
|
||||
if (tmps.Length < 4 ||
|
||||
!Double.TryParse(tmps[3], NumberStyles.Float, Culture.NumberFormatInfo, out s))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user