Changes between Version 14 and Version 15 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/String


Ignore:
Timestamp:
04/12/23 15:56:25 (13 months ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/String

    v14 v15  
    2121PrintLCD(szMsg);
    2222}}}
    23 The 825 library also provides sprintf_s which is a macro to perform snprintf and automatically provide the second parameter using the sizeof the buffer provided in the first parameter. This can only be used with the first parameter is a simple character array as in the above example. If the first parameter is a pointer to an array this cannot be used because the sizeof operator will not give the desired result.
     23The 825 library also provides sprintf_s which is a macro to perform snprintf and automatically provide the second parameter using the sizeof the buffer provided in the first parameter. This can only be used when the first parameter is a simple character array as in the above example. If the first parameter is a pointer to an array this cannot be used because the sizeof operator will not give the desired result.
    2424
    2525There is also a strncpy function that limits string copy to a specified length. However, strncpy is not recommended as a safe strcpy because it does not automatically NULL terminate strings.