Give you enough string functions in Java web reporting tool

Discussion in 'Software' started by freezea, Oct 8, 2009.

  1. freezea

    freezea

    Joined:
    May 21, 2009
    Messages:
    7
    Background
    String functions are widely used in all applications and web reporting tool is no exception. However, common web reporting tools only provide some common string functions. Such as substring acquisition, blank deleting, character conversion (character←→Unicode), string length, case conversion (lower←→upper), etc. When other string functions are needed, programmers have to realize them by programming.

    Some string functions may be easy, while some may be very difficult. As the number of string functions is huge, it is impossible for programmer to realize all of them one by one.

    Take string splitting for an example.

    String splitting means to split a string to a string array according to separators. It seems easy, but difficult in fact. The reasons are as follows:

    1. The definition of separators should be flexible according to different requirements.

    2. The number of separators is variable in a string. There may be only one separator or several separators.

    3. Users should be allowed to decide whether to split with the separators between two quotation marks, or brackets.

    According to reason (3), it is easy to find that parameter options are important in string function.

    Solution
    As a pure Java web reporting tool, RAQ Report provides a complete set of string functions for users’ convenience. Moreover, every string function has several flexible parameter options. With these powerful string functions, users can realize their sting operations with great ease.

    Example
    Take the string splitting function Split ( ) of RAQ Report for an example as shown below:

    Syntax:
    split( srcExp,sepExp{,boolExp})

    Argument:
    srcExp The string to be split.
    sepExp The separator.
    boolExp The parameter option which decides whether to split with the separator between two quotation marks, or brackets. True means to split, while false means not. The default value is false.

    Examples:
    (1) =split(”ab;cd;ef;tg;tt”,”;”) The return value is ["ab","cd","ef","tg","tt"].
    (2) =split(”ab;c’d;e’f;tg;tt”,”;”,false) The return value is ["ab","c'd;e'f","tg","tt"].
    (3) =split(”ab;c[d;e]f;tg;tt”,”;”,true) The return value is ["ab","c[d","e]f”,”tg”,”tt”].
    freezea, Oct 8, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lib
    Replies:
    0
    Views:
    485
  2. lib
    Replies:
    1
    Views:
    546
  3. newasp.net
    Replies:
    1
    Views:
    1,598
    imransyed63
    Aug 21, 2008
  4. freezea
    Replies:
    0
    Views:
    1,660
    freezea
    Sep 9, 2009
  5. freezea
    Replies:
    0
    Views:
    1,206
    freezea
    Dec 6, 2009
Loading...

Share This Page