cm0002@lemmy.world to Programmer Humor@programming.dev · 2 days agoDoes this exist anywhere outside of C++?lemmy.mlimagemessage-square55fedilinkarrow-up1162arrow-down122cross-posted to: programmerhumor@lemmy.ml
arrow-up1140arrow-down1imageDoes this exist anywhere outside of C++?lemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 2 days agomessage-square55fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squarer00ty@kbin.lifelinkfedilinkarrow-up3·2 days agoMaybe 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?
minus-squarevithigar@lemmy.calinkfedilinkarrow-up4·2 days agoC# also has verbatim strings, in which you can just put a literal newline. string foo = @"This string has a line break!";
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?
C# also has verbatim strings, in which you can just put a literal newline.
string foo = @"This string has a line break!";