summaryrefslogtreecommitdiffstats
path: root/include/StringOperations.h
blob: 53519fe58a9df34b958631df6646fd8525a3d80a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef STRINGOPERATIONS_H
#define STRINGOPERATIONS_H

#include <Types.h>


class MemArea
{
    private:
        uintptr start, final;
    public:
        MemArea();
        MemArea(const uintptr start, const uintptr final);
        uintptr begin();
        uintptr end();
        bool valid();

        typedef uintptr iterator;
};

class StringOperations
{
    public:
        // Return the starting address where is sequence is allocated
        // else NULL
        static void *findInMemory(const char *sequence, MemArea memory);
        // Return size of ASCIZ sequence without 0-symbol, NULL on failure
        static uint32 sequenceSize(const char *chars);
};

#endif