• r00ty@kbin.life
    link
    fedilink
    arrow-up
    3
    ·
    2 days ago

    Maybe c# has similar. There’s \r\n or \n like c++ and Environment.NewLine.

    Probably it’s similar in that Environment.NewLine takes into account the operating system in use and I wonder if endl in c++ does the same thing?

    • vithigar@lemmy.ca
      link
      fedilink
      arrow-up
      4
      ·
      1 day ago

      C# also has verbatim strings, in which you can just put a literal newline.

      string foo = @"This string 
      has a line break!";