Go Down

Topic: String Library Bugs? Substring and Index Of.. (Read 561 times) previous topic - next topic


I've include in my librarys WString 0.8;
And i tryng get a data from browser using method get, to filter and print in lcd.
But the function substring not working...

Code: [Select]

if (c == '\n') {
       lcd.print("lendo cmd" + linhaEntrada.length()) ;
         lcd.print(linhaEntrada) ;
         //Analise aqui o conteudo enviado pelo submit
           // se a linha recebida contem GET e R1=ON etnão ativa o pino do rele
             digitalWrite(pinDigRele,HIGH) ;
             releAtivado=true ;
               lcd.print("rele ativado");

// its not working... indexOf and substring
             int textoini = linhaEntrada.indexOf("=");
             txtWebLcd = linhaEntrada.substring(textoini+1,textoini+16); //expample
             Serial.println(txtWebLcd); //nothing showed
             Serial.println(textoini); /nothing showed
             Serial.println(linhaEntrada.substring(1,2)); //using directly /nothing showed  
             lcd.print("conteudo L1");

Go Up