summaryrefslogtreecommitdiff
path: root/wizards/source/tools/Strings.xba
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-04-30 10:45:28 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-04-30 10:45:28 +0000
commit745c9166f0ecacf2b71d21258fc510ee96dcb4ce (patch)
tree17bba343095ba28a9aad06f4f7af6a062f1563db /wizards/source/tools/Strings.xba
parent69b116398fb158fe269f0346e87af2cd5f7d05c7 (diff)
*** empty log message ***
Diffstat (limited to 'wizards/source/tools/Strings.xba')
-rw-r--r--wizards/source/tools/Strings.xba22
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
-
&apos; Deletes the Char &apos;CompChar&apos; out of the String &apos;BigString&apos;
&apos; in case CompChar&apos;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
-
&apos; Retrieves an Array out of a String.
&apos; The fields of the Array are separated by the parameter &apos;Separator&apos;, that is contained
&apos; in the Array
@@ -202,6 +200,25 @@ Dim a as Integer
End Sub
+&apos; Searches for a String in a two-dimensional Array by querying all Searchindexex of the second dimension
+&apos; 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() = &quot;&quot;
+End Function
+
+
&apos; Replaces the string &quot;OldReplace&quot; through the String &quot;NewReplace&quot; in the String
&apos; &apos;BigString&apos;
Function ReplaceString(ByVal Bigstring, NewReplace, OldReplace as String) as String
@@ -259,7 +276,6 @@ Dim Separator as String
End Function
-
&apos; Retrieves the second value for a next to &apos;SearchString&apos; in
&apos; a two-dimensional string-Array
Function FindSecondValue(SearchString as String, TwoDimList() as String ) as String