Main Site Documentation

Question about text justifying in netmf


#1

I have a string that is 16 characters wide and I need to right justify the text in it… Usually I would just use string.Format but netmf doesnt have that…

Any ideas on how to do this?


#2

This is “micro” framework so it doesn’t have everything you see in full .NET. You may need to do those little things manually.


#3

Any idea how I can do this “manually”?


#4

Try this:

String field = "ABCD        ";
field = field.Trim();
field = new String(' ', 16 - field.Length) + field;

#5

Awesome, worked perfectly… Now my FEZ lcd/keypad shield has scrolling text running in separate threads… Thanks for your help…