[ create a new paste ] login | about

Link: http://codepad.org/fGmsaaxt    [ raw code | output | fork ]

C, pasted on Jan 28:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <string.h>
#include <stdio.h>
#include <stddef.h>

int main()
{
    const char * source = "FN;CHARSET=UTF-8:David Celery";
    const char * newBegin = strrchr(source, ':');
    if (!newBegin)
    {
        puts("Error!");
        return -1;
    }
    newBegin++;
    puts(newBegin);
    return 0;
}


Output:
1
David Celery


Create a new paste based on this one


Comments: