Private Function かっこ内の文字列を消す(Input_St As Variant) As Variant
Dim Return_St As Variant
Dim i As Long
Dim str As String
Dim write_switch As Long
write_switch = 0
For i = 1 To Len(Input_St)
str = Mid(Input_St, i, 1)
If str = "<" Or str = "(" Then
write_switch = write_switch + 1
End If
If write_switch = 0 Then
Return_St = Return_St & str
End If
If str = ">" Or str = ")" Then
write_switch = write_switch - 1
End If
Next i
かっこ内の文字列を消す = Return_St
End Function
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme