Arduino Text Scrolling on 16x02 I2c on NodeMcu (esp8266-12)

Here is a crude version for the serial monitor which you can add the LCD stuff to.
If that gets you started, we can then look at improving it along the lines I originally suggested.

String line = "This is my long String to scroll" ;

void setup() {
  Serial.begin ( 9600 ) ;
  if ( line.length() <= 16 ) {
    Serial.println( line ) ;
  }
  else {
    for ( int i = 0 ; i <= line.length() - 16 ; i++ ) {
      Serial.println( line.substring( i, i + 16 ) ) ;
      delay( 500 ) ;
    }
  }
}

void loop() { }