[Mono-list] Fixing string
Sascha Manns
Sascha.Manns at mailbox.org
Tue Feb 7 19:22:56 UTC 2017
Hello list,
i'm using that method for creating a string for using in the terminal:
private static string PrepareRevision(string member1, string member2,
string member3, string member4, string member5, string revnumber,
string language)
{
string revisionstring = " add_revision --member " + member1;
if (member2 != "")
{
revisionstring += " --member " + member2;
if (member3 != "")
{
revisionstring += " --member " + member3;
if (member4 != "")
{
revisionstring += " --member " + member4;
if (member5 != "")
{
revisionstring += " --member " + member5;
}
}
}
}
if (revnumber != "")
{
revisionstring += " --revnumber " + revnumber;
}
if (language != "")
{
revisionstring += " --lang " + language;
}
Console.WriteLine(revisionstring);
return revisionstring;
}
The string looks like: add_revision --member Lorem ipsum dolor1 --
member Lorem ipsum dolor2 --member Lorem ipsum dolor3 --member Lorem
ipsum dolor4 --member Lorem ipsum dolor5 --revnumber 0.79.2-4 --lang
de-DE
But i need a string which looks like: add_revision --member "Lorem
ipsum dolor1" --member "Lorem ipsum dolor2" --member "Lorem ipsum
dolor3" --member "Lorem ipsum dolor4" --member "Lorem ipsum dolor5" --
revnumber 0.79.2-4 --lang de-DE
Is this possible?
Greetings Sascha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-list/attachments/20170207/f14fd96e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.dot.net/pipermail/mono-list/attachments/20170207/f14fd96e/attachment-0001.sig>
More information about the Mono-list
mailing list