Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
44412221
Commit
44412221
authored
May 09, 2020
by
Ignacio Etcheverry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C#: Remove StringExtensions.Empty() function
Causes issues with some editors as it's confused with `string.Empty`. Should use `string.IsNullOrEmpty(str)` instead.
parent
61306eb8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
StringExtensions.cs
.../mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
+5
-13
No files found.
modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
View file @
44412221
...
...
@@ -12,7 +12,7 @@ namespace Godot
{
private
static
int
GetSliceCount
(
this
string
instance
,
string
splitter
)
{
if
(
instance
.
Empty
()
||
splitter
.
Empty
(
))
if
(
string
.
IsNullOrEmpty
(
instance
)
||
string
.
IsNullOrEmpty
(
splitter
))
return
0
;
int
pos
=
0
;
...
...
@@ -29,7 +29,7 @@ namespace Godot
private
static
string
GetSliceCharacter
(
this
string
instance
,
char
splitter
,
int
slice
)
{
if
(!
instance
.
Empty
(
)
&&
slice
>=
0
)
if
(!
string
.
IsNullOrEmpty
(
instance
)
&&
slice
>=
0
)
{
int
i
=
0
;
int
prev
=
0
;
...
...
@@ -237,10 +237,10 @@ namespace Godot
// </summary>
public
static
int
CompareTo
(
this
string
instance
,
string
to
,
bool
caseSensitive
=
true
)
{
if
(
instance
.
Empty
(
))
return
to
.
Empty
(
)
?
0
:
-
1
;
if
(
string
.
IsNullOrEmpty
(
instance
))
return
string
.
IsNullOrEmpty
(
to
)
?
0
:
-
1
;
if
(
to
.
Empty
(
))
if
(
string
.
IsNullOrEmpty
(
to
))
return
1
;
int
instanceIndex
=
0
;
...
...
@@ -287,14 +287,6 @@ namespace Godot
}
// <summary>
// Return true if the string is empty.
// </summary>
public
static
bool
Empty
(
this
string
instance
)
{
return
string
.
IsNullOrEmpty
(
instance
);
}
// <summary>
// Return true if the strings ends with the given string.
// </summary>
public
static
bool
EndsWith
(
this
string
instance
,
string
text
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment