mirror of
https://github.com/Smaug123/dotnet-classical-ciphers
synced 2025-10-05 12:38:40 +00:00
Initial commit
This commit is contained in:
13
CipherSuite.Test/String.fs
Normal file
13
CipherSuite.Test/String.fs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace CipherSuite.Test
|
||||
|
||||
[<RequireQualifiedAccess>]
|
||||
module String =
|
||||
|
||||
let stripNonAlpha (s : string) =
|
||||
s.ToCharArray ()
|
||||
|> Array.choose (fun c ->
|
||||
let c = System.Char.ToUpper c
|
||||
let shifted = int c - 65
|
||||
if shifted >= 0 && shifted < 26 then Some c else None
|
||||
)
|
||||
|> System.String
|
Reference in New Issue
Block a user