IRCBot Plugin API  v5
Public Attributes | List of all members
API_textfunc Struct Reference

#include <plugins.h>

Public Attributes

int(* replace )(char *str, int32 bufsize, const char *findstr, const char *replstr)
 
char *(* trim )(char *buf, const char *strtrim)
 Trims both ends of a string of any characters in the string strtrim. More...
 
char *(* duration )(uint32 num, char *buf)
 Encodes a number of seconds into this format: 2d 1h 15m and stores in buf (and returns buf) More...
 
int32(* decode_duration )(const char *buf)
 Decodes a string of this format: 2d 1h 15m into a number of seconds. More...
 
int(* wildcmp )(const char *wild, const char *string)
 Case-sensitive wildcard matching, returns 0 for not match, other for match. More...
 
int(* wildicmp )(const char *wild, const char *string)
 Case-insensitive wildcard matching, returns 0 for not match, other for match. More...
 
bool(* get_range )(const char *buf, int32 *imin, int32 *imax)
 Parses a string in the form of MIN:MAX or just a number. ie. 1:5, 10, 1:2, 75, etc. In the case of a single number MIN=MAX. More...
 

Detailed Description

This structure contains the latest stats combined stats for your Sound Server.

Member Data Documentation

int(* API_textfunc::replace)(char *str, int32 bufsize, const char *findstr, const char *replstr)

Simple string replacement

Parameters
strThe string to do replacements in
bufsizeThe buffer size that str is in. If you buffer is the same length as the string you should use strlen(str)+1
findstrThe string to find
replstrThe string to replace find with
char*(* API_textfunc::trim)(char *buf, const char *strtrim)

Trims both ends of a string of any characters in the string strtrim.

char*(* API_textfunc::duration)(uint32 num, char *buf)

Encodes a number of seconds into this format: 2d 1h 15m and stores in buf (and returns buf)

int32(* API_textfunc::decode_duration)(const char *buf)

Decodes a string of this format: 2d 1h 15m into a number of seconds.

int(* API_textfunc::wildcmp)(const char *wild, const char *string)

Case-sensitive wildcard matching, returns 0 for not match, other for match.

int(* API_textfunc::wildicmp)(const char *wild, const char *string)

Case-insensitive wildcard matching, returns 0 for not match, other for match.

bool(* API_textfunc::get_range)(const char *buf, int32 *imin, int32 *imax)

Parses a string in the form of MIN:MAX or just a number. ie. 1:5, 10, 1:2, 75, etc. In the case of a single number MIN=MAX.


The documentation for this struct was generated from the following file: