<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>String je object, dobře se s ním pracuje, netřeba hlídat konec,
      spojování pomocí +, dá se v něm vyhledávat, zkracovat atd. (žere
      podstatně více paměti)<br>
    </p>
    <p>string je pole charů předem s přesně definovanou délkou a lze  se
      na něj odkazovat pomocí pointeru (to na String nejde) (žere jen
      n+1 byte )<br>
    </p>
    <p><br>
    </p>
    Petr<br>
    <br>
    <div class="moz-cite-prefix">Dne 31. 10. 17 v 12:38 hwnews
      konference napsal(a):<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFMbtH9=U-WkM33LYj88gdGLmP7RNXh_rcQ7T+a=yMUxJ1OYGg@mail.gmail.com">
      <div dir="ltr">Aha no tak to je fajn...o tech stringach co nejsou
        Stringy jsem tak nejak netusil....jo ted uz to dam
        dohromady...snad ;-)
        <div><br>
        </div>
        <div>RV</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">Dne 31. října 2017 12:35 Petr Zapadlo <span
            dir="ltr"><<a href="mailto:zapik@email.cz"
              target="_blank" moz-do-not-send="true">zapik@email.cz</a>></span>
          napsal(a):<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <p>Protože to je String a ne string :-)</p>
              <p>String:</p>
              <p><a class="m_5409446531146029777moz-txt-link-freetext"
                  href="https://www.arduino.cc/en/Reference/StringObject"
                  target="_blank" moz-do-not-send="true">https://www.arduino.cc/en/<wbr>Reference/StringObject</a></p>
              <p>string = char array</p>
              <p><a class="m_5409446531146029777moz-txt-link-freetext"
                  href="https://www.arduino.cc/en/Reference/String"
                  target="_blank" moz-do-not-send="true">https://www.arduino.cc/en/<wbr>Reference/String</a></p>
              <p>To jsou 2 diametrálně odlišné proměnné a jinak se s
                nimi pracuje.</p>
              <p>Petr<br>
              </p>
              <p><br>
              </p>
              <br>
              <div class="m_5409446531146029777moz-cite-prefix">Dne 31.
                10. 17 v 12:33 hwnews konference napsal(a):<br>
              </div>
              <div>
                <div class="h5">
                  <blockquote type="cite">
                    <div dir="ltr">Hmmm, tak proc funguje tohle:
                      <div><br>
                      </div>
                      <div>
                        <div>String message = "File Not Found\n\n";</div>
                        <div>  message += "URI: ";</div>
                        <div>  message += server.uri();</div>
                        <div>  message += "\nMethod: ";</div>
                        <div>  message += (server.method() ==
                          HTTP_GET)?"GET":"POST";</div>
                        <div>  message += "\nArguments: ";</div>
                        <div>  message += server.args();</div>
                        <div>  message += "\n";</div>
                        <div>  for (uint8_t i=0; i<server.args();
                          i++){</div>
                        <div>    message += " " + server.argName(i) + ":
                          " + server.arg(i)+ "\n";<br>
                        </div>
                        <div>  }<br>
                        </div>
                        <div>  server.send(404, "text/plain", message);</div>
                      </div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">2017-10-31 12:20
                        GMT+01:00 Jaromir Sukuba <span dir="ltr"><<a
                            href="mailto:jarin.hw@gmail.com"
                            target="_blank" moz-do-not-send="true">jarin.hw@gmail.com</a>></span>:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex"><span>" message += " "
                            + rv_text+ "\n";"<br>
                          </span>takto sa v C-cku stringy nespajaju.
                          Vlastne, v C-cku neexistuju<br>
                          stringy, ale polia char-ov ukoncene nulami (a
                          vlastne ani tie polia<br>
                          neexistuju, len kus pamate na ktory ukazuje
                          smernik). Tie sa daju<br>
                          spajat trebars cez funckiu strcat, alebo mozno
                          povedzme aj sprintf-om<br>
                          (ma vacsie moznosti, ale tazkopadnejsia
                          metoda).<br>
                          <div>
                            <div class="m_5409446531146029777h5"><br>
                              2017-10-31 12:11 GMT+01:00 hwnews
                              konference <<a
                                href="mailto:hwnews@cncnet.info"
                                target="_blank" moz-do-not-send="true">hwnews@cncnet.info</a>>:<br>
                              > Zdravim,<br>
                              ><br>
                              > delam si ten palubni budik na lod s 
                              e-ink displejem a ESP32. Ohybam nejake<br>
                              > knihovny, ktere jsou v examplech...na
                              displej uz kreslim, web mi take jede,<br>
                              > ale zasekl jsem se na pro me
                              nepochopitelne definici procedury:<br>
                              ><br>
                              > void DrawStringAt(int x, int y, const
                              char* text, sFONT* font, int colored);<br>
                              ><br>
                              > ja jsem tu deklaraci puvodne
                              nezkoumal, protoze primo vlozeny string
                              jako<br>
                              > parametr fungoval<br>
                              ><br>
                              > Kdyz jsem to ale chtel pouzit takto
                              tak jsem si nabehnul:<br>
                              ><br>
                              > for (uint8_t i=0; i<server.args();
                              i++){<br>
                              >     rv_text =  server.argName(i) + ":
                              " + server.arg(i);<br>
                              >     message += " " + rv_text+ "\n";<br>
                              >     paint.DrawStringAt(0, 0, rv_text,
                              &Font8, UNCOLORED);<br>
                              >     epd.SetPartialWindow(paint.Ge<wbr>tImage(),
                              0, 20+(i*12), paint.GetWidth(),<br>
                              > paint.GetHeight());<br>
                              >   }<br>
                              ><br>
                              ><br>
                              > void DrawStringAt(int x, int y, const
                              char* text, sFONT* font, int colored);<br>
                              >                                     
                                                    ^<br>
                              > epdpaint.h:56:10: note:   no known
                              conversion for argument 3 from 'String'<br>
                              > to 'const char*'<br>
                              ><br>
                              > cela ta procedura je napsana takto:<br>
                              ><br>
                              > void Paint::DrawStringAt(int x, int
                              y, const char* text, sFONT* font, int<br>
                              > colored) {<br>
                              >     const char* p_text = text;<br>
                              >     unsigned int counter = 0;<br>
                              >     int refcolumn = x;<br>
                              ><br>
                              >     /* Send the string character by
                              character on EPD */<br>
                              >     while (*p_text != 0) {<br>
                              >         /* Display one character on
                              EPD */<br>
                              >         DrawCharAt(refcolumn, y,
                              *p_text, font, colored);<br>
                              >         /* Decrement the column
                              position by 16 */<br>
                              >         refcolumn += font->Width;<br>
                              >         /* Point on the next
                              character */<br>
                              >         p_text++;<br>
                              >         counter++;<br>
                              >     }<br>
                              > }<br>
                              ><br>
                              > Jak by se to melo upravit abyto bylo
                              koser?<br>
                              ><br>
                              > RV<br>
                              ><br>
                            </div>
                          </div>
                          > ______________________________<wbr>_________________<br>
                          > HW-list mailing list  -  sponsored by <a
                            href="http://www.HW.cz" rel="noreferrer"
                            target="_blank" moz-do-not-send="true">www.HW.cz</a><br>
                          > <a href="mailto:Hw-list@list.hw.cz"
                            target="_blank" moz-do-not-send="true">Hw-list@list.hw.cz</a><br>
                          > <a
                            href="http://list.hw.cz/mailman/listinfo/hw-list"
                            rel="noreferrer" target="_blank"
                            moz-do-not-send="true">http://list.hw.cz/mailman/list<wbr>info/hw-list</a><br>
                          ><br>
                          ______________________________<wbr>_________________<br>
                          HW-list mailing list  -  sponsored by <a
                            href="http://www.HW.cz" rel="noreferrer"
                            target="_blank" moz-do-not-send="true">www.HW.cz</a><br>
                          <a href="mailto:Hw-list@list.hw.cz"
                            target="_blank" moz-do-not-send="true">Hw-list@list.hw.cz</a><br>
                          <a
                            href="http://list.hw.cz/mailman/listinfo/hw-list"
                            rel="noreferrer" target="_blank"
                            moz-do-not-send="true">http://list.hw.cz/mailman/list<wbr>info/hw-list</a><br>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                    <br>
                    <fieldset
                      class="m_5409446531146029777mimeAttachmentHeader"></fieldset>
                    <br>
                    <pre>______________________________<wbr>_________________
HW-list mailing list  -  sponsored by <a class="m_5409446531146029777moz-txt-link-abbreviated" href="http://www.HW.cz" target="_blank" moz-do-not-send="true">www.HW.cz</a>
<a class="m_5409446531146029777moz-txt-link-abbreviated" href="mailto:Hw-list@list.hw.cz" target="_blank" moz-do-not-send="true">Hw-list@list.hw.cz</a>
<a class="m_5409446531146029777moz-txt-link-freetext" href="http://list.hw.cz/mailman/listinfo/hw-list" target="_blank" moz-do-not-send="true">http://list.hw.cz/mailman/<wbr>listinfo/hw-list</a>
</pre>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            ______________________________<wbr>_________________<br>
            HW-list mailing list  -  sponsored by <a
              href="http://www.HW.cz" rel="noreferrer" target="_blank"
              moz-do-not-send="true">www.HW.cz</a><br>
            <a href="mailto:Hw-list@list.hw.cz" moz-do-not-send="true">Hw-list@list.hw.cz</a><br>
            <a href="http://list.hw.cz/mailman/listinfo/hw-list"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://list.hw.cz/mailman/<wbr>listinfo/hw-list</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
HW-list mailing list  -  sponsored by <a class="moz-txt-link-abbreviated" href="http://www.HW.cz">www.HW.cz</a>
<a class="moz-txt-link-abbreviated" href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</a>
<a class="moz-txt-link-freetext" href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>