140
you are viewing a single comment's thread
view the rest of the comments
[-] r00ty@kbin.life 3 points 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 4 points 2 days ago

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

string foo = @"This string 
has a line break!";
this post was submitted on 05 Apr 2025
140 points (88.0% liked)

Programmer Humor

22250 readers
191 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS