Testing blog posts with code

Testing out code posts.

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
open System
open System.Text.RegularExpressions

let postDate = new DateTime(2018, 11, 29) 
let unformattedName = "Canadian Breakfast Stout (CBS)"
let formattedDate = postDate.ToString "yyyy-MM-dd"
let replaceSpaceWithHyphen (x:string) = x.Replace(" ", "-")
let removeNonHtmlCharacters (x:string) = x.Replace("(", "-").Replace(")","-")
let removeMultipleHyphens (x:string) = Regex.Replace(x, "-+", "-")
let trimHyphen (x:string) = x.Trim('-')
let toLower (x:string) = x.ToLower()
let formatInput (x:string) = replaceSpaceWithHyphen x
                            |> removeNonHtmlCharacters
                            |> removeMultipleHyphens
                            |> trimHyphen
                            |> toLower

let formatPostName (date:string) (text:string) = formatInput (date + "-" + text) + ".jpeg"

formatPostName formattedDate unformattedName
namespace System
namespace System.Text
namespace System.Text.RegularExpressions
val postDate : DateTime

Full name: helloworldagain.postDate
Multiple items
type DateTime =
  struct
    new : ticks:int64 -> DateTime + 10 overloads
    member Add : value:TimeSpan -> DateTime
    member AddDays : value:float -> DateTime
    member AddHours : value:float -> DateTime
    member AddMilliseconds : value:float -> DateTime
    member AddMinutes : value:float -> DateTime
    member AddMonths : months:int -> DateTime
    member AddSeconds : value:float -> DateTime
    member AddTicks : value:int64 -> DateTime
    member AddYears : value:int -> DateTime
    ...
  end

Full name: System.DateTime

--------------------
DateTime()
   (+0 other overloads)
DateTime(ticks: int64) : unit
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: DateTimeKind) : unit
   (+0 other overloads)
val unformattedName : string

Full name: helloworldagain.unformattedName
val formattedDate : string

Full name: helloworldagain.formattedDate
DateTime.ToString() : string
DateTime.ToString(provider: IFormatProvider) : string
DateTime.ToString(format: string) : string
DateTime.ToString(format: string, provider: IFormatProvider) : string
val replaceSpaceWithHyphen : x:string -> string

Full name: helloworldagain.replaceSpaceWithHyphen
val x : string
Multiple items
val string : value:'T -> string

Full name: Microsoft.FSharp.Core.Operators.string

--------------------
type string = String

Full name: Microsoft.FSharp.Core.string
String.Replace(oldValue: string, newValue: string) : string
String.Replace(oldChar: char, newChar: char) : string
val removeNonHtmlCharacters : x:string -> string

Full name: helloworldagain.removeNonHtmlCharacters
val removeMultipleHyphens : x:string -> string

Full name: helloworldagain.removeMultipleHyphens
Multiple items
type Regex =
  new : pattern:string -> Regex + 1 overload
  member GetGroupNames : unit -> string[]
  member GetGroupNumbers : unit -> int[]
  member GroupNameFromNumber : i:int -> string
  member GroupNumberFromName : name:string -> int
  member IsMatch : input:string -> bool + 1 overload
  member Match : input:string -> Match + 2 overloads
  member Matches : input:string -> MatchCollection + 1 overload
  member Options : RegexOptions
  member Replace : input:string * replacement:string -> string + 5 overloads
  ...

Full name: System.Text.RegularExpressions.Regex

--------------------
Regex(pattern: string) : unit
Regex(pattern: string, options: RegexOptions) : unit
Regex.Replace(input: string, pattern: string, evaluator: MatchEvaluator) : string
Regex.Replace(input: string, pattern: string, replacement: string) : string
Regex.Replace(input: string, pattern: string, evaluator: MatchEvaluator, options: RegexOptions) : string
Regex.Replace(input: string, pattern: string, replacement: string, options: RegexOptions) : string
val trimHyphen : x:string -> string

Full name: helloworldagain.trimHyphen
String.Trim() : string
String.Trim([<ParamArray>] trimChars: char []) : string
val toLower : x:string -> string

Full name: helloworldagain.toLower
String.ToLower() : string
String.ToLower(culture: Globalization.CultureInfo) : string
val formatInput : x:string -> string

Full name: helloworldagain.formatInput
val formatPostName : date:string -> text:string -> string

Full name: helloworldagain.formatPostName
val date : string
val text : string