Oracle9i OLAP Services Developer's Guide to the Oracle OLAP API
Release 1 (9.0.1)

Part Number A88756-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

Performing Calculations, 7 of 7


Working With Strings

String manipulation methods

The StringSource class defines methods that are string-specific versions of various Source methods that you can use to append, insert, select, and remove elements whose values are Java String objects. The StringSource class also has methods that you can use to manipulate the elements of the StringSource objects. These methods include those listed in the following table.

Method 

Description 

length() 

Determines the length of each element of the StringSource

textFill(width) 

Reformats each element of the StringSource to the specified width by adding blank spaces.  

toLowercase() 

Converts the alphabetic characters of each element of the StringSource into lowercase. 

toUppercase() 

Converts the alphabetic characters of each element of the StringSource into uppercase. 

trim() 

Removes the leading and trailing blank spaces from each element of the StringSource

trimLeading() 

Removes the leading blank spaces from each element of the StringSource

trimTrailing 

Removes the trailing blank spaces from each element of the StringSource

Substring methods

The OLAP API provides the methods that you can use to manipulate substrings within the elements of a StringSource. These methods include those listed in the following table.

Method 

Description 

indexOf (substring, fromIndex) 

Searches each element of the StringSource beginning at the specified character position and identifies the position of the first character of the specified substring. 

remove (index, length) 

Removes the characters between the specified character positions from each element of the StringSource 

replace (oldString, newString) 

Searches each element of the StringSource for the specified substring, and replaces it with a different substring when it is found 

substring (index, length) 

Selects the characters between the specified character positions from each element of the 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 © 1996-2001, 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