C Language Development Kit/Snippets/String

From OptiWiki

Jump to: navigation, search

Some very common used string function in applications. Below you'll find descriptions on how they can be used in your application.

Sources of all string functions

To be able to use the string functions, include the following header file and source file in your project.

Header file strfunc.h (source)
Source file strfunc.c (source)

Functions to remove leading and trailing characters

The Following functions can be used to remove specific leading and trailing characters.

  • TrimRight() Removes the specific trailing characters from the string.
  • TrimLeft() Removes the specific leading characters from the string.
  • Trim() Removes the specific leading and trailing characters from the string.

Function to center the string

The following function can be used to center a string.

Views
Personal tools