Replacing all platform-specific newlines with a generic visible tag.
ID: 911
See: {@Newline}, Introduction
using uCalcSoftware;
var uc = new uCalc();
var t = new uCalc.Transformer();
t.FromTo("{@Newline}", "[BR]");
string input = "Line 1\nLine 2\r\nLine 3";
Console.WriteLine(t.Transform(input));
Line 1[BR]Line 2[BR]Line 3 using uCalcSoftware; var uc = new uCalc(); var t = new uCalc.Transformer(); t.FromTo("{@Newline}", "[BR]"); string input = "Line 1\nLine 2\r\nLine 3"; Console.WriteLine(t.Transform(input));
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
uCalc::Transformer t;
t.FromTo("{@Newline}", "[BR]");
string input = "Line 1\nLine 2\r\nLine 3";
cout << t.Transform(input) << endl;
}
Line 1[BR]Line 2[BR]Line 3 #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; uCalc::Transformer t; t.FromTo("{@Newline}", "[BR]"); string input = "Line 1\nLine 2\r\nLine 3"; cout << t.Transform(input) << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Dim t As New uCalc.Transformer()
t.FromTo("{@Newline}", "[BR]")
Dim input = $"Line 1{vbLf}Line 2{vbCrLf}Line 3"
Console.WriteLine(t.Transform(input))
End Sub
End Module
Line 1[BR]Line 2[BR]Line 3 Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t As New uCalc.Transformer() t.FromTo("{@Newline}", "[BR]") Dim input = $"Line 1{vbLf}Line 2{vbCrLf}Line 3" Console.WriteLine(t.Transform(input)) End Sub End Module