CSBiology / FSharpAux

Auxiliary functions and data structures for the F# programming language
MIT License
23 stars 16 forks source link

Fix `String.last` & `String.first` errors #22

Closed omaus closed 1 year ago

omaus commented 1 year ago
kMutagene commented 1 year ago

I'd suggest raising the same error messages as built-in functions, which use invalidArg: https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/exception-handling/the-invalidarg-function

e.g. invalidArg (nameof str) "The input string was empty"

Examples:

image