MPLABĀ® Harmony Graphics Suite
GFX v3.13.0
Legato API Documentation
|
String utility functions and definitions. More...
#include "gfx/legato/string/legato_string.h"
Go to the source code of this file.
Functions | |
uint32_t | leStringUtils_FromCStr (const char *str, leChar *buf, uint32_t size) |
Convert c-style string to leChar. More... | |
uint32_t | leStringUtils_ToCStr (const leChar *str, uint32_t strSize, char *buf, uint32_t bufSize) |
Convert leChar buffer to C-style string. More... | |
leResult | leStringUtils_GetRect (const leChar *str, uint32_t size, const leFont *font, leRect *rect) |
Get bounding rectangle for a leChar style string. More... | |
leResult | leStringUtils_GetRectCStr (const char *str, const leFont *font, leRect *rect) |
Gets the bounding rectangle for a C-style string. More... | |
uint32_t | leStringUtils_GetLineCount (const leChar *str, uint32_t size) |
Get line count for a leChar style string. More... | |
uint32_t | leStringUtils_GetLineCountCStr (const char *str) |
Get line count for a C-style string. More... | |
leResult | leStringUtils_GetLineIndices (const leChar *str, uint32_t size, uint32_t line, uint32_t *start, uint32_t *end) |
Get line indices for a leChar style string. More... | |
leResult | leStringUtils_GetLineIndicesCStr (const char *str, uint32_t line, uint32_t *start, uint32_t *end) |
Gets the line indices for a C-style string. More... | |
leResult | leStringUtils_GetLineRect (const leChar *str, uint32_t size, const leFont *font, uint32_t line, leRect *rect) |
Gets the line bounding rectangle for a leChar style string. More... | |
leResult | leStringUtils_GetLineRectCStr (const char *str, const leFont *font, uint32_t line, leRect *rect) |
Gets the line bounding rectangle for a C-style string. More... | |
leResult | leStringUtils_GetCharRect (const leChar *str, uint32_t size, const leFont *font, uint32_t charIdx, leRect *rect) |
Gets a glyph bounding rectangle for a leChar style string. More... | |
leResult | leStringUtils_GetCharRectCStr (const char *str, const leFont *font, uint32_t charIdx, leRect *rect) |
Gets a glyph bounding rectangle for a C-style string. More... | |
String utility functions and definitions.
This module implements various string utility functions..
uint32_t leStringUtils_FromCStr | ( | const char * | str, |
leChar * | buf, | ||
uint32_t | size | ||
) |
Convert c-style string to leChar.
Converts up to size elements of c-style string str to buf.
str | is the source C-style string. |
buf | the destination leChar string. |
size | is the size of the destination string in leChar |
leResult leStringUtils_GetCharRect | ( | const leChar * | str, |
uint32_t | size, | ||
const leFont * | font, | ||
uint32_t | charIdx, | ||
leRect * | rect | ||
) |
Gets a glyph bounding rectangle for a leChar style string.
Gets a glyph bounding rectangle for a leChar style string.
str | is an integer. |
buf | is an integer. |
leResult leStringUtils_GetCharRectCStr | ( | const char * | str, |
const leFont * | font, | ||
uint32_t | charIdx, | ||
leRect * | rect | ||
) |
Gets a glyph bounding rectangle for a C-style string.
Gets a glyph bounding rectangle for a C-style string.
str | is an integer. |
buf | is an integer. |
uint32_t leStringUtils_GetLineCount | ( | const leChar * | str, |
uint32_t | size | ||
) |
Get line count for a leChar style string.
Gets the line count for str with size.
str | is an leChar string. |
size | is an integer. |
uint32_t leStringUtils_GetLineCountCStr | ( | const char * | str | ) |
Get line count for a C-style string.
Gets the line count for str.
str | is an integer. |
leResult leStringUtils_GetLineIndices | ( | const leChar * | str, |
uint32_t | size, | ||
uint32_t | line, | ||
uint32_t * | start, | ||
uint32_t * | end | ||
) |
Get line indices for a leChar style string.
Gets the line indices for str with size at line from start to end .
str | is an integer. |
buf | is an integer. |
leResult leStringUtils_GetLineIndicesCStr | ( | const char * | str, |
uint32_t | line, | ||
uint32_t * | start, | ||
uint32_t * | end | ||
) |
Gets the line indices for a C-style string.
Gets the line indices for a C-style string.
str | is an integer. |
buf | is an integer. |
leResult leStringUtils_GetLineRect | ( | const leChar * | str, |
uint32_t | size, | ||
const leFont * | font, | ||
uint32_t | line, | ||
leRect * | rect | ||
) |
Gets the line bounding rectangle for a leChar style string.
Gets the line bounding rectangle for a leChar style string.
str | is a string pointer. |
size | is the length of the string. |
font | is the font object that provides the glyph metrics |
line | is the line number to query |
rect | is the resulting bounding rect |
leResult leStringUtils_GetLineRectCStr | ( | const char * | str, |
const leFont * | font, | ||
uint32_t | line, | ||
leRect * | rect | ||
) |
Gets the line bounding rectangle for a C-style string.
Gets the line bounding rectangle for a C-style string.
str | is a C string pointer. |
font | is the font object that provides the glyph metrics |
line | is the line number to query |
rect | is the resulting bounding rect |
leResult leStringUtils_GetRect | ( | const leChar * | str, |
uint32_t | size, | ||
const leFont * | font, | ||
leRect * | rect | ||
) |
Get bounding rectangle for a leChar style string.
Gets the bounding rect for up to size characters of str with font.
str | is a string pointer. |
size | is the length of the string. |
font | is the font object that provides the glyph metrics |
rect | is the resulting bounding area |
Gets the bounding rectangle for a C-style string.
Gets the bounding rect of str with font.
str | is a C string pointer. |
font | is the font object that provides the glyph metrics |
rect | is the resulting bounding area |
uint32_t leStringUtils_ToCStr | ( | const leChar * | str, |
uint32_t | strSize, | ||
char * | buf, | ||
uint32_t | bufSize | ||
) |
Convert leChar buffer to C-style string.
Converts leChar buffer at most strSize of str to buf of size bufSize.
str | is an integer. |
buf | is an integer. |