Changes between Version 14 and Version 15 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/String
- Timestamp:
- 04/12/23 15:56:25 (20 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Docs/Prog/Manual/ApplicationLibraries/lib825ev/String
v14 v15 21 21 PrintLCD(szMsg); 22 22 }}} 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 w iththe 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.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 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. 24 24 25 25 There 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.