String objects vs char arrays in Arduino: A Practical Comparison - Arduino Uno Programming Basics

Поделиться
HTML-код
  • Опубликовано: 19 ноя 2024

Комментарии • 5

  • @usercentered
    @usercentered Месяц назад

    Like and agree to your video fully.
    The convenience of String objects win for me. I do most of my projects with ESP8266 or an ESP32 and I rarely see the need to use char arrays.
    Points to maybe address in a later video, the annoying need to guess char array sizes up front (e.g. for input) and the F() macro for memory.
    Cheers

  • @bob_mosavo
    @bob_mosavo 2 месяца назад +2

    The so-called shortcomings of string manipulation in C is as old as the hills. Using C++ for string manipulation makes string manipulation programming easier; however, how much more memory in a memory constricted device do you have to spare and how much many more instructions do you have to execute for easier string manipulation in C++❓ Accordingly, saying that using C++ for string manipulation is "better" makes no sense unless you can answer those two questions based on your hardware and your design specification 😜

  • @bob_mosavo
    @bob_mosavo 2 месяца назад

    In C, anything between single quotes is a single character, e.g., '\0', '\t', 'A', '
    ', '3', etc.

    • @playduino
      @playduino  2 месяца назад +1

      Good point 👍