Campbell Scientific CR3000 Micrologger User Manual

Page 507

Advertising
background image

Appendix A. CRBasic Programming Instructions

507

 

Len 
Returns the number of bytes in a string. 

Syntax 

Variable = Len(StringVar)

LowerCase 
Converts a string to all lowercase characters. 

Syntax 

String = LowerCase(SourceString)

Mid 
Returns a substring that is within a string. 

Syntax 

String = Mid(SearchString, Start, Length)

Replace 
Searches a string for a substring and replaces that substring with a different 
string. 

Syntax 

variable = Replace(SearchString, SubString, ReplaceString)

Right 
Returns a substring that is a defined number of characters from the right side of 
the original string. 

Syntax 

variable = Right(SearchString, NumChars)

RTrim 
Returns a copy of a string with no trailing spaces. 

Syntax 

variable = RTrim(TrimString)

StrComp 
Compares two strings by subtracting the characters in one string from the 
characters in another 

Syntax 

Variable = StrComp(String1, String2)

SplitStr 
Splits out one or more strings or numeric variables from an existing string. 

Syntax 

SplitStr(SplitResult, SearchString, FilterString, NumSplit,

SplitOption)

SPrintF 
Converts data to formatted strings.  Returns length of formatted string.  Replaces 
FormatFloat() and FormatLong(). 

Syntax 

length = SPrintF(Destination, format,...)

Advertising