MS Module Base StringFunctions
Modules.Jibs Sichtbeleg Anpassung
This commit is contained in:
@@ -89,6 +89,7 @@
|
||||
<Compile Include="FileWatcher\FileWatcherProperties.vb" />
|
||||
<Compile Include="IDB\Constants.vb" />
|
||||
<Compile Include="MimeEx.vb" />
|
||||
<Compile Include="StringFunctions.vb" />
|
||||
<Compile Include="WindowsEx.vb" />
|
||||
<Compile Include="ModuleExtensions.vb" />
|
||||
<Compile Include="FileEx.vb" />
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' indem Sie "*" wie unten gezeigt eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.3.6.0")>
|
||||
<Assembly: AssemblyFileVersion("1.3.6.0")>
|
||||
<Assembly: AssemblyVersion("1.3.7.0")>
|
||||
<Assembly: AssemblyFileVersion("1.3.7.0")>
|
||||
|
||||
22
Base/StringFunctions.vb
Normal file
22
Base/StringFunctions.vb
Normal file
@@ -0,0 +1,22 @@
|
||||
Public Class StringFunctions
|
||||
Public Shared Function SplitText_Length(ByVal input As String, ByVal maxLength As Integer) As List(Of String)
|
||||
Dim result As New List(Of String)
|
||||
|
||||
For i As Integer = 0 To input.Length - 1 Step maxLength
|
||||
' Textabschnitt extrahieren
|
||||
Dim chunk As String = input.Substring(i, Math.Min(maxLength, input.Length - i))
|
||||
result.Add(chunk)
|
||||
Next
|
||||
|
||||
Return result
|
||||
End Function
|
||||
Public Shared Function SplitTextByNewLine(text As String) As List(Of String)
|
||||
If String.IsNullOrEmpty(text) Then
|
||||
Return New List(Of String)()
|
||||
End If
|
||||
|
||||
' Zerlege den Text anhand von Zeilenumbrüchen
|
||||
Dim lines As List(Of String) = text.Split({vbCrLf, vbLf, vbCr}, StringSplitOptions.None).ToList()
|
||||
Return lines
|
||||
End Function
|
||||
End Class
|
||||
Reference in New Issue
Block a user