Files
egtbeamwall/EgtBEAMWALL.ViewerOptimizer/BeamMachiningsWindow/TablesUtility.vb
T
Emmanuele Sassi 4c1289ed2d - sviluppo L250
- aggiunta tabelle lavorazioni
2021-05-24 19:13:22 +02:00

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