Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended print with newline and center char #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bstin
Copy link

@bstin bstin commented Sep 23, 2024

The print function will now recognize newline and center chars and modify string accordingly.

The newline and center chars are configurable but set as "\n" and "\c" by default.

For example:

lcd.print("Line1\nLine2") will print (assuming 16 cols):

"Line1           "
"Line2           "

lcd.print("\cLine1\n\cLine2") will print (assuming 16 cols):

"     Line1      "
"     Line2      "

They can be mixed and matched, so this also works.

lcd.print("\cLine1\nLine2") will print (assuming 16 cols):

"     Line1      "
"Line2            "

The print function will now recognize newline and center chars and modify string accordingly. 

The newline and center chars are configurable but set as "\n" and "\c" by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant