Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Simplify and improve perf of String.length
  • Loading branch information
abelbraaksma committed Jun 17, 2020
commit 92680733ef4001f908e80f36d9fea03cd9b08b4d
5 changes: 5 additions & 0 deletions FSharp.v3.ncrunchsolution.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<SolutionConfiguration>
<Settings>
<CurrentEngineMode>Run all tests automatically [Global]</CurrentEngineMode>
</Settings>
</SolutionConfiguration>
6 changes: 2 additions & 4 deletions src/fsharp/FSharp.Core/string.fs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,5 @@ namespace Microsoft.FSharp.Core

[<CompiledName("Length")>]
let length (str:string) =
if String.IsNullOrEmpty str then
0
else
str.Length
if isNull str then 0
else str.Length