Str_Substr; Str_Writefloat - Conrad C-Control Pro Mega Series Manual

Table of Contents

Advertisement

187
C-Control Pro Mega Series

6.17.7 Str_Substr

String Functions (Library "String_Lib.cc")
Syntax
int Str_SubStr(char source[],char search[]);
Sub Str_SubStr(ByRef source As Char,ByRef search As Char) As Integer
Description
A substring search is searched inside string source. If the substring is found, the position of the substring
is returned.
Parameter
source string that is searched
search substring that is looked for
Return Parameter
position of the found substring
-1 else

6.17.8 Str_WriteFloat

String Functions
Syntax
void Str_WriteFloat(float n, byte decimal, char text[], word offset);
Sub Str_WriteFloat(n As Single,decimal As Byte,ByRef text As Char,offset
As Word)
Description
The floating point number n is converted to an ASCII string with decimal number of decimal digits after the
period. The result is stored in the string text with an offset of offset. The offset parameter is used to change
a string after a specified number (offset) of characters and leave the beginning of the string intact.
Parameter
n
float number
decimal number of decimal digit after the period
text
pointer to destination string
offset
offset that is applied to the position where the string is copied
If offset has the value STR_APPEND (0xffff) then the length of the destination string is assumed as
offset. In this case the source string is copied behind the destination string.
© 2008 Conrad Electronic

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the C-Control Pro Mega Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

C-control pro mega32C-control pro mega128

Table of Contents