Skip Headers

Oracle9i OLAP Developer's Guide to the OLAP API
Release 2 (9.2)

Part Number A95297-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Making Queries Using Source Methods, 8 of 8


Manipulating String Values

The StringSource class defines methods that are string-specific versions of various Source methods that you can use to append, insert, select, and remove values whose values are Java String objects.

The StringSource class also has methods listed in Table 6-6 that you can use to manipulate the values of the StringSource objects. The OLAP API also provides the methods listed in Table 6-7 that you can use to manipulate substrings within the values of a StringSource.

Table 6-6  Methods for Manipulating the values of StringSource Objects
Method Description

length()

Creates a new NumberSource with the same structure as the base StringSource and whose values are the length of each value of the StringSource.

textFill(width)

Creates a new StringSource, with the same structure as the base StringSource, whose values are each value of the base StringSource reformatted o the specified width by adding blank spaces.

toLowercase()

Creates a new StringSource, with the same structure as the base StringSource, whose values are the values of the base StringSource with all alphabetic characters in lowercase.

toUppercase()

Creates a new StringSource, with the same structure as the base StringSource, whose values are the values of the base StringSource with all alphabetic characters in uppercase.

trim()

Creates a new StringSource, with the same structure as the base StringSource, whose values are the values of the base StringSource with the leading and trailing blank spaces removed.

trimLeading()

Creates a new StringSource, with the same structure as the base StringSource, whose values are the values of the base StringSource with the leading blank spaces removed.

trimTrailing

Creates a new StringSource, with the same structure as the base StringSource, whose values are the values of the base StringSource with the trailing blank spaces removed.

Table 6-7 Methods for Manipulating Substrings of StringSource Objects
Method Description

indexOf (substring, fromIndex)

Creates a new StringSource, with the same structure as the base StringSource, whose values are the specified substrings in the values of the base StringSource that begin after the specified character position.

remove (index, length)

Creates a new StringSource, with the same structure as the base StringSource, whose values a re the values of the base StringSource with the characters between the specified character positions removed.

replace (oldString, newString)

Creates a new StringSource, with the same structure as the base StringSource, whose values are the values of the base StringSource with the specified substring, and replaced with a different substring.

substring (index, length)

Creates a new StringSource, with the same structure as the base StringSource, whose values are the specified substrings in the values of the base StringSource.

There are two different versions of each of these methods. In one version you specify the values using Source objects, in the other you specify the values using literal values.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback