Skip to content

Instantly share code, notes, and snippets.

View acken's full-sized avatar

Svein Arne Ackenhausen acken

View GitHub Profile
@acken
acken / gist:5825b4cf2c755b27f818
Last active August 29, 2015 14:02
Command string parser
// Takes a "quoted argument string ignoring \" escaped" arguments. Returns an array of arguments
let commandStringToArguments (cmd: string) =
// Checks whether a quote is lead by an escape char
let isUnescapedQuote (i, c) =
c.Equals('"') && (i.Equals(0) || (cmd |> Seq.toArray).[i-1] <> '\\')
// Get the start and end position of quoted strings
let quotedStrings =
cmd
|> Seq.toArray
class Hello {
public void thisIsId() {
}
}
can you edit this??