1uoffset(3)                      Allegro manual                      uoffset(3)
2
3
4

NAME

6       uoffset  -  Finds  the  offset of a character in a string. Allegro game
7       programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       int uoffset(const char *s, int index);
14

DESCRIPTION

16       Finds out the offset (in bytes from the start of  the  string)  of  the
17       character  at  the  specified `index' in the string `s'. A zero `index'
18       parameter will return the first character of the string. If `index'  is
19       negative,  it counts backward from the end of the string, so an `index'
20       of `-1' will return an offset to the last character. Example:
21
22          int from_third_letter = uoffset(text_string, 2);
23

RETURN VALUE

25       Returns the offset in bytes to the specified character.
26
27

SEE ALSO

29       ugetat(3), usetat(3), uinsert(3), uremove(3)
30
31
32
33Allegro                          version 4.2.2                      uoffset(3)
Impressum