4c1289ed2d
- aggiunta tabelle lavorazioni
19 lines
592 B
VB.net
19 lines
592 B
VB.net
Imports System.Text.RegularExpressions
|
|
|
|
Module TablesUtility
|
|
|
|
Friend Function SearchKey(sLine As String, sKey As String) As String
|
|
Return Regex.Match(sLine, "[,|{|\s]" & sKey & "\s*=\s*['|\""]?(.*?)\s*?[,|}|'|\""]").Groups(1).Value
|
|
End Function
|
|
|
|
Public Function CountCharacter(ByVal sLine As String, ByVal cValue As Char) As Integer
|
|
Dim nCount As Integer = 0
|
|
Dim cArray() As Char = sLine.ToCharArray
|
|
For Index As Integer = 0 To cArray.Count - 1
|
|
If cArray(Index) = cValue Then nCount += 1
|
|
Next
|
|
Return nCount
|
|
End Function
|
|
|
|
End Module
|