Intrinsic Conversions
Username:  
Password:
  > Home
> User Guide
v Reference
    > Introduction
    > CROFT
    v BEE Variables
       > BEE Variable Name
       o BEE Variable Value
       v BEE Conversions
          o Intrinsic Conversions
          o User-defined Conversions
          o To string or not to string
    > BEE Syntax
    > BEE Commands
    > Database Operation
    > Content Management
    > Objects and Classes
    > Interface with others
    o Glossary
> Portal Object
> Development Guide


Shortcuts
sys Class
debug Class
Intrinsic Conversions
>> Reference >> BEE Variables >> BEE Conversions >> Intrinsic Conversions <=  =>      <  1  2  3  4  5  6  >  
m to p Conversions built into BEE

Conversion

Input Type

Output Type

Description

meansfalse

String

String

Returns true if the input string is "false", "no", "off" or a numeric "0" (case insensitive).  Returns false if otherwise.  This conversion is usually used to handle user input.

meanstrue

String

String

Returns true if the input string is "true", "yes", "on" or a numeric non-zero (case insensitive).  Returns false if otherwise.  This conversion is usually used to handle user input.

match

String

Array

Match the regular expression in the argument string to the input string, and return a 10-element array (regardless the number of matches).

The first element of the array (indexed by 0) is the string matching the regular expression.

If small bracket pairs are found in the regular expression, the second element (indexed by 1) will contain the substring enclosed by the first left open bracket and its corresponding closing bracket exclusively, and the third element (indexed by 2) will contain the one by the second left bracket and so on.

An empty array will return if it is not a match.

merge

Array

Array

Take the argument string as an array specification and merge it to the input string.  That is to append the argument array to the input array and return the result array.  For any common elements (with the same element name in both arrays), the one in the argument array element will replace that of the input array element.  (Numeric key will be ignored and the element will take on the positional index – 0 for the first element and so on.)

newkey

Array

Array

Return an array containing strings (usually numeric) which can be used as the keys for new elements of the input array (i.e. guarantee uniqueness.)  No element is created.  The argument string is the number of keys to be returned.  Default is to return one key only.

newkeys

Array

Array

Same as "newkey"

newval

Array

Array

Return an array containing strings (usually numeric) which are not equal to any elements of the input array (i.e. guarantee uniqueness.)  No element is created.  The argument string is the number of values to be returned.  Default is to return one value only.

newvalue

Array

Array

Same as "newval"

newvalues

Array

Array

Same as "newval"

nosysargs

Array

Array

Remove all possible system arguments from the input array and return the result array.

parseform

String

Array

Convert a query string passed via the URL from a form GET submission, into an array of which each element correspond to a submitted value (indexed by the entry name.)

The conversion "parseform" is usually used when you have acquired the query string in ways other than the URL.  For those from the URL, it would be easier to access them via sys%form or form%.

parseurl

String

Array

Take the input string as a URL and returns the parts of it including scheme", "host", "port", "user", "pass", "path", "query", and "fragment".

parsevar

String

Array

Take the input string as a BEE variable name and return an array of at most five elements indexed by "class", "file", "name", "element" and "conv", representing the five parts of the BEE variable name in the input string.

At least "class" and "name" will be returned ("class" is default to "value" and "name" can be blank) unless the input string is empty, in which case an empty array (one without elements) will be returned.

plural

String

String

Convert the number in the input string into a quantity with the unit specifies in the argument string.  If the absolute value of the number is greater than one, the unit will be in plural form (which is generated by observing only simple rules like -s, -ies, etc.)  If the number is zero, "No" followed by the plural unit will be returned.

pluralunit

String

String

Like "plural" except that it only returns the unit part without the quantity.

pop

Array

String

Take the last element of the input array away, and return that element.

The input array is passed by reference.  It must be either a variable as in:

var a conv=pop;

or a value casted as a variable as in:

var a = "(var)arr" conv=pop;

precede

String

String

Return the input string preceded with the argument string if the input string is not null.  Otherwise, return null.

present

Array

String

Generate a string representation of the array, one item per line, or if the item is multiple lines, show each line under the key heading.

printf

String

String

Take the format from the input string and substitute the variables from the comma-delimited argument string, and return the result.

propercase

String

String

Convert the first letter of every word in the input string into uppercase.  Optionally, you can use the argument string to specify a word boundary character.  The default is space.

push

Array

Array

Append the argument string to the input array and return the result array.

The input array is passed by reference.  It will get an extra element at the end after this operation.

Previous Page       Next Page

Accsoft Computer Technology Pty Ltd     ABN: 98 065 617 549
PO Box 892, Epping NSW 1710         Level 1, Epping Office Park, 242 Beecroft Rd, Epping NSW 2121, Australia
Tel: Sydney - (02)98691668     National - 1300-881668         Fax: (02)98691866
© Copyright 2003 Accsoft Computer Technology Pty Ltd