I dont know where is .print() in lcd library

Hello, i want to add a new function to the LCD library, but i cant find the .print() function in the .h or .cpp file, and y dont figure where it is...

I can make the function out of the library but i think that is usefull for more persons.

I want to auto center the message into the lcd display row and for this i want to modify the .print function and make something like this.

lcd.autoCenter(true);
lcd.print("Hola caracola");
and the .print autocenter the message

If you look at the class definition in the lcd library (whichever one it is that you are using), you will (probably) see that the class derives from the Print class.

The lcd.print() function that is actually invoked is one of the Print::print() methods.

The autoCenter addition would be nice, but be sure to consider that happens if the user then specifies a cursor position to write to, and what happens if the text doesn't all fit on one line. Be sure to accommodate all LCD widths and heights that the base library supports.

Thank you a lot, i am new in C++, and i am learning at the time i am writting code.

for the moment i will try to add a function to the library that dont use the lcd.print() something like lcd.centerprint() and i will see if writting code i am hable to understod all the code that is into the library.

The version is the version that come with Arduino enviroment 18

Than you for the answer.

Hello another time, i am looking the lcd library and it includes "Print.h" but i am looking on arduino lib and there is not a Print.h library i was looking on /usr/lib/avr/ all the folders and i down found the library but if i remember good when you import something like this "Print.h" you want to import a file that is in the same folder than the source and if you make this <print.h> you are including a standar library...

Is this allright in the arduino or not?

Thank you a lot.

Hello, i have found the Print.h library, thank us a lot for all.

For others, the functions of arduino enviroment are into the Arduino folder, under Hardware->Arduino->Cores->Arduino->

Thank all.