diff options
author | Behrend Cornelius <bc@openoffice.org> | 2001-04-30 10:45:28 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2001-04-30 10:45:28 +0000 |
commit | 745c9166f0ecacf2b71d21258fc510ee96dcb4ce (patch) | |
tree | 17bba343095ba28a9aad06f4f7af6a062f1563db /wizards/source/tools/Strings.xba | |
parent | 69b116398fb158fe269f0346e87af2cd5f7d05c7 (diff) |
*** empty log message ***
Diffstat (limited to 'wizards/source/tools/Strings.xba')
-rw-r--r-- | wizards/source/tools/Strings.xba | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/wizards/source/tools/Strings.xba b/wizards/source/tools/Strings.xba index dc46957781be..c478804e5f08 100644 --- a/wizards/source/tools/Strings.xba +++ b/wizards/source/tools/Strings.xba @@ -75,7 +75,6 @@ Dim BigLen% End Function - ' Deletes the Char 'CompChar' out of the String 'BigString' ' in case CompChar's Position in BigString is right at the beginning Function LTRimChar(ByVal BigString as String,CompChar as String) as String @@ -92,7 +91,6 @@ Dim BigLen as integer End Function - ' Retrieves an Array out of a String. ' The fields of the Array are separated by the parameter 'Separator', that is contained ' in the Array @@ -202,6 +200,25 @@ Dim a as Integer End Sub +' Searches for a String in a two-dimensional Array by querying all Searchindexex of the second dimension +' and delivers the specific String of the ReturnIndex in the second dimension of the Searchlist() +Function StringInMultiArray(SearchList(), SearchString as String, SearchIndex as Integer, ReturnIndex as Integer, Optional MaxIndex as Integer) as String +Dim i as integer +Dim CurFieldString as String + If IsMissing(MaxIndex) Then + MaxIndex = Ubound(SearchList(),1) + End If + For i = Lbound(SearchList()) to MaxIndex + CurFieldString = SearchList(i,SearchIndex) + If Ucase(CurFieldString) = Ucase(SearchString) Then + StringInMultiArray() = SearchList(i,ReturnIndex) + Exit Function + End if + Next + StringInMultiArray() = "" +End Function + + ' Replaces the string "OldReplace" through the String "NewReplace" in the String ' 'BigString' Function ReplaceString(ByVal Bigstring, NewReplace, OldReplace as String) as String @@ -259,7 +276,6 @@ Dim Separator as String End Function - ' Retrieves the second value for a next to 'SearchString' in ' a two-dimensional string-Array Function FindSecondValue(SearchString as String, TwoDimList() as String ) as String |