![Advantech UbiQ User Manual Download Page 89](http://html1.mh-extra.com/html/advantech/ubiq/ubiq_user-manual_2856809089.webp)
83
UbiQ Scenario Manager User Manual
Chapter 5
Functions
Reference
5.2.31
strlen
Syntax
int strlen(char* pChar) or
int strlen(string aStr)
Parameters
pChar: Specifies a Null-ended character array
aStr: Specifies a string variable
Description
This function return the character number of NULL ended character array or a
string variable.
Example
// The example will show the pChar and f1 in the debug window
char pChar[20]; // declare pChar as char[20]
string aStr; // declare aStr as string
aStr=”String”;
pChar=”pChar”;
setdebug(TRUE);
debug(“strlen(“,aStr,”)=”,strlen(aStr)); // It will show “strlen(String)=6”
debug(“strlen(“,pChar,”)=”,strlen(pChar)); // It will show “strlen(pChar)=5”
See Also
strcpy
5.2.32
time
Syntax
string time()
Parameters
none
Description
This function returns the current date, its format is fixed as “hh:mm:ss”.
Example
string sTime;
setdebug(TRUE);
sDate=time();
debug(“The current time is”,sTime);
See Also
date
Summary of Contents for UbiQ
Page 1: ...User Manual UbiQ Scenario Manager User Manual V1 03...
Page 4: ...UbiQ Scenario Manager User Manual iv...
Page 7: ...Chapter 1 1 Introduction...
Page 13: ...Chapter 2 2 Getting Started...
Page 37: ...Chapter 3 3 Tutorials...
Page 47: ...Chapter 4 4 Basic of Smart C Script Language...
Page 62: ...UbiQ Scenario Manager User Manual 56...