anchor.diff:  
   /// Writes a file line by line
   let WriteFile file lines = WriteToFile false file lines
  -  
  +
   /// Appends all lines to a file line by line
   let AppendToFile file lines = WriteToFile true file lines
   
   /// Reads a file as one text
  -let inline ReadFileAsString file = File.ReadAllText(file,encoding)
  +let inline ReadFileAsString file = File.ReadAllText(file, encoding)
   
   /// Reads a file as one array of bytes
   let ReadFileAsBytes = File.ReadAllBytes
  
positive.code: let inline appendStringIfValueIsNotNullOrEmpty value = appendIfTrue (isNullOrEmpty value |> not)
  
  /// Appends a text if the value is not null or empty.
  let inline appendIfNotNullOrEmpty value s =
      appendIfTrue (isNotNullOrEmpty value) (sprintf "%s%s" s value)
  
  /// Appends all notnull fileNames.
  let inline appendFileNamesIfNotNull fileNames (builder:StringBuilder) =
      fileNames 
        |> Seq.fold (fun builder file -> appendIfTrue (isNullOrEmpty file |> not) file builder) builder
  
  /// Returns the text from the StringBuilder
  let inline toText (builder:StringBuilder) = builder.ToString()
  
  /// [omit]
  let private regexes = new Dictionary<_,_>()
  
  /// [omit]
  let getRegEx pattern =
      match regexes.TryGetValue pattern with
      | true, regex -> regex
      | _ -> (new System.Text.RegularExpressions.Regex(pattern))
  
  /// [omit]
  let regex_replace pattern (replacement:string) text =
      (getRegEx pattern).Replace(text,replacement)
  
  /// Checks whether the given char is a german umlaut.
  let isUmlaut c = Seq.exists ((=) c) ['ä'; 'ö'; 'ü'; 'Ä'; 'Ö'; 'Ü'; 'ß']
  
  /// Converts all characters in a string to lower case.
  let inline toLower (s:string) = s.ToLower()
  
  /// Returns all standard chars and digits.
  let charsAndDigits = ['a'..'z'] @ ['A'..'Z'] @ ['0'..'9'] 
  
  /// Checks whether the given char is a standard char or digit.
  let isLetterOrDigit c = List.exists ((=) c) charsAndDigits
  
  /// Trims the given string with the DirectorySeparatorChar
  let inline trimSeparator (s:string) = s.TrimEnd Path.DirectorySeparatorChar
  
  /// Trims all special characters from a string.
  let inline trimSpecialChars (text:string) =
      text
        |> Seq.filter isLetterOrDigit
        |> Seq.filter (isUmlaut >> not)
        |> Seq.fold (fun (acc:string) c -> acc + string c) ""
  
  /// Trims the given string
  let inline trim (x: string) = if isNullOrEmpty x then x else x.Trim()
  
  /// Trims the given string
  let inline trimChars chars (x: string) = if isNullOrEmpty x then x else x.Trim chars
  
  /// Lifts a string to an option
  let liftString x = if isNullOrEmpty x then None else Some x
  
  /// Reads a file line by line
  let ReadFile (file:string) =   
      seq {use textReader = new StreamReader(file, encoding)
           while not textReader.EndOfStream do
               yield textReader.ReadLine()}
  
  /// Reads the first line of a file. This can be helpful to read a password from file.
  let ReadLine (file:string) =   
    use sr = new StreamReader(file, Encoding.Default)
    sr.ReadLine()
  
  /// Writes a file line by line
  let WriteToFile append fileName (lines: seq<string>) =    
      let fi = fileInfo fileName
  
      use writer = new StreamWriter(fileName,append && fi.Exists,encoding) 
      lines |> Seq.iter writer.WriteLine
  
  /// Removes all trailing .0 from a version string
  let rec NormalizeVersion(version:string) =
      let elements = version.Split [|'.'|]
      let mutable version = ""
      for i in 0..3 do
          if i < elements.Length then
              if version = "" then version <- elements.[i] else version <- version + "." + elements.[i]
  
      if version.EndsWith ".0" then 
          version.Remove(version.Length-2,2) |> NormalizeVersion 
      else 
          version
  
  /// Writes a byte array to a file
  let WriteBytesToFile file bytes = File.WriteAllBytes(file,bytes)
  
  /// Writes a string to a file
  let WriteStringToFile append fileName (text:string) =
      let fi = fileInfo fileName
  
      use writer = new StreamWriter(fileName,append && fi.Exists,encoding) 
      writer.Write text
  
  /// Replaces the file with the given string
  let ReplaceFile fileName text =
      let fi = fileInfo fileName
      if fi.Exists then
          fi.IsReadOnly <- false
          fi.Delete()
      WriteStringToFile false fileName text
  
negative.code: let inline isNullOrWhiteSpace value = isNullOrEmpty value || value |> Seq.forall Char.IsWhiteSpace
  
  /// Replaces the given pattern in the given text with the replacement
  let inline replace (pattern : string) replacement (text : string) = text.Replace(pattern, replacement)
  
  /// Converts a sequence of strings to a string with delimiters
  let inline separated delimiter (items : string seq) = String.Join(delimiter, Array.ofSeq items)
  
  /// Removes the slashes from the end of the given string
  let inline trimSlash (s : string) = s.TrimEnd('\\')
  
  /// Splits the given string at the given char delimiter
  let inline split (delimiter : char) (text : string) = text.Split [| delimiter |] |> Array.toList
  
  /// Splits the given string at the given string delimiter
  let inline splitStr (delimiterStr : string) (text : string) = 
      text.Split([| delimiterStr |], StringSplitOptions.None) |> Array.toList
  
  /// Converts a sequence of strings into a string separated with line ends
  let inline toLines text = separated Environment.NewLine text
  
  /// Checks whether the given text starts with the given prefix
  let startsWith prefix (text : string) = text.StartsWith prefix
  
  /// Checks whether the given text ends with the given suffix
  let endsWith suffix (text : string) = text.EndsWith suffix
  
  /// Determines whether the last character of the given <see cref="string" />
  /// matches Path.DirectorySeparatorChar.         
  let endsWithSlash = endsWith (Path.DirectorySeparatorChar.ToString())
  
  /// Replaces the first occurrence of the pattern with the given replacement.
  let replaceFirst (pattern : string) replacement (text : string) = 
      let pos = text.IndexOf pattern
      if pos < 0 then text
      else text.Remove(pos, pattern.Length).Insert(pos, replacement)
  
  /// Appends a text to a StringBuilder.
  let inline append text (builder : StringBuilder) = builder.Append(sprintf "\"%s\" " text)
  
  /// Appends a text to a StringBuilder without surrounding quotes.
  let inline appendWithoutQuotes (text : string) (builder : StringBuilder) = builder.Append(text)
  
  /// Appends string of function value if option has some value
  let inline appendIfSome o f builder = 
      match o with
      | Some(value) -> appendWithoutQuotes (f value) builder
      | None -> builder
  
  /// Appends a text if the predicate is true.
  let inline appendIfTrue p s builder = 
      if p then append s builder
      else builder
  
  /// Appends a text if the predicate is false.
  let inline appendIfFalse p = appendIfTrue (not p)
  
  /// Appends a text if the value is not null.
  let inline appendIfNotNull (value : Object) s = 
      appendIfTrue (value <> null) (match value with
                                    | :? String as sv -> (sprintf "%s%s" s sv)
                                    | _ -> (sprintf "%s%A" s value))
  
  /// Appends a quoted text if the value is not null.
  let inline appendQuotedIfNotNull (value : Object) s (builder : StringBuilder) = 
      if (value = null) then builder
      else 
          (match value with
           | :? String as sv -> builder.Append(sprintf "%s\"%s\" " s sv)
           | _ -> builder.Append(sprintf "%s\"%A\" " s value))
  
  /// Appends a text if the value is not null.
  let inline appendStringIfValueIsNotNull value = appendIfTrue (value <> null)
  