summaryrefslogtreecommitdiff
path: root/wizards/source/scriptforge/SF_String.xba
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/source/scriptforge/SF_String.xba')
-rw-r--r--wizards/source/scriptforge/SF_String.xba22
1 files changed, 11 insertions, 11 deletions
diff --git a/wizards/source/scriptforge/SF_String.xba b/wizards/source/scriptforge/SF_String.xba
index e482b1a8a846..272a2d1cefa7 100644
--- a/wizards/source/scriptforge/SF_String.xba
+++ b/wizards/source/scriptforge/SF_String.xba
@@ -25,7 +25,7 @@ Option Explicit
''' Space(32), HT(9), LF(10), VT(11), FF(12), CR(13), Next Line(133), No-break space(160),
''' Line separator(8232), Paragraph separator(8233)
''' A quoted string:
-''' The quoting chararacter must be the double quote (")
+''' The quoting character must be the double quote (")
''' To preserve a quoting character inside the quoted substring, use (\) or (") as escape character
''' => [str\"i""ng] means [str"i"ng]
''' Escape sequences: symbolic name(Ascii number) = escape sequence
@@ -76,7 +76,7 @@ Const cstCHARSWITHACCENT = "ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙ
Const cstCHARSWITHOUTACCENT = "AAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyySsYZz" _
& "AaDdIiUuOoUuAaAaAaAaAaAaAaAaAaAaAaAaEeEeEeEeEeEeEeEeIiIiOoOoOoOoOoOoOoOoOoOoOoOoUuUuUuUuUuUuUuYyYyYyYyd"
-REM ===================================================== CONSTRUCTOR/DESCTRUCTOR
+REM ===================================================== CONSTRUCTOR/DESTRUCTOR
REM -----------------------------------------------------------------------------
Public Function Dispose() As Variant
@@ -189,14 +189,14 @@ Public Function Count(Optional ByRef InputStr As Variant _
, Optional ByRef IsRegex As Variant _
, Optional ByVal CaseSensitive As Variant _
) As Long
-''' Counts the number of occurrences of a substring or a regular exprsession within a string
+''' Counts the number of occurrences of a substring or a regular expression within a string
''' Args:
''' InputStr: the input stringto examine
''' Substring: the substring to identify
''' IsRegex: True if Substring is a regular expression (default = False)
''' CaseSensitive: default = False
''' Returns:
-''' The numer of occurrences as a Long
+''' The number of occurrences as a Long
''' Examples:
''' SF_String.Count("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "\b[a-z]+\b", IsRegex := True, CaseSensitive := True)
''' returns 7 (the number of words in lower case)
@@ -1134,7 +1134,7 @@ Check:
Try:
If Len(InputStr) > 0 And Len(Pattern) > 0 Then
- ' Substiture special chars by escaped chars
+ ' Substitute special chars by escaped chars
sRegex = SF_String.ReplaceStr(Pattern, Split(cstSPecialChars, ","), Split(cstEscapedChars, ","))
bLike = SF_String.IsRegex(InputStr, sRegex, CaseSensitive)
End If
@@ -1405,7 +1405,7 @@ End Function ' ScriptForge.SF_String.IsUpper
REM -----------------------------------------------------------------------------
Public Function IsUrl(Optional ByRef InputStr As Variant) As Boolean
''' Return True if the string is a valid absolute URL (Uniform Resource Locator)
-''' The parsing is done by the ParseStrict methof of the URLTransformer UNO service
+''' The parsing is done by the ParseStrict method of the URLTransformer UNO service
''' https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1util_1_1XURLTransformer.html
''' Args:
''' InputStr: the input string
@@ -2119,7 +2119,7 @@ Public Function SplitLines(Optional ByRef InputStr As Variant _
, Optional ByVal KeepBreaks As Variant _
) As Variant
''' Return an array of the lines in a string, breaking at line boundaries
-''' Line boundariess include LF(10), VT(12), CR(13), LF+CR, File separator(28), Group separator(29), Record separator(30),
+''' Line boundaries include LF(10), VT(12), CR(13), LF+CR, File separator(28), Group separator(29), Record separator(30),
''' Next Line(133), Line separator(8232), Paragraph separator(8233)
''' Args:
''' InputStr: the input string
@@ -2153,7 +2153,7 @@ Check:
End If
Try:
- ' In next list CR + LF must preceede CR and LF
+ ' In next list CR + LF must precede CR and LF
vLineBreaks = Array(SF_String.sfCRLF, SF_String.sfLF, Chr(12), SF_String.sfCR _
, Chr(28), Chr(29), Chr(30), Chr(133), Chr(8232), Chr(8233))
@@ -2192,7 +2192,7 @@ Public Function SplitNotQuoted(Optional ByRef InputStr As Variant _
''' Args:
''' InputStr: the input string
''' Might contain quoted substrings:
-''' The quoting chararacter must be the double quote (")
+''' The quoting character must be the double quote (")
''' To preserve a quoting character inside the quoted substring, use (\) or (") as escape character
''' => [str\"i""ng] means [str"i"ng]
''' Delimiter: A string of one or more characters that is used to delimit the input string
@@ -2548,7 +2548,7 @@ Check:
Try:
If Len(InputStr) > 0 Then
sWrap = SF_String.Unescape(InputStr) ' Replace symbolic breaks
- sWrap = SF_String.ExpandTabs(sWrap, TabSize) ' Interprete TABs to have a meaningful Width
+ sWrap = SF_String.ExpandTabs(sWrap, TabSize) ' Interpret TABs to have a meaningful Width
' First, split full string
vWrapLines = SF_String.SplitLines(sWrap, KeepBreaks := True) ' Keep pre-existing breaks
If UBound(vWrapLines) = 0 And Len(sWrap) <= Width Then ' Output a single line
@@ -2608,7 +2608,7 @@ Private Function _Repr(ByRef pvString As String) As String
''' the converted string
Dim sString As String ' Return value
-Dim sChar As String ' A single chararacter
+Dim sChar As String ' A single character
Dim lAsc As Long ' Ascii value
Dim lPos As Long ' Position in sString
Dim i As Long