Programming |  C Programming |  substr

Copy part of a string. Copy count characters from src, starting from start.

Parameters:

  • src - String to copy from
  • start - Initial offset
  • count - Number of chars to copy

    Return Value

    The new string

    example

        char *part, *str = 'Test one, test two';
        part = substr(str, 1, 5);
        puts(part); // -> est o
    

    so, where did this come from?