Last active
January 3, 2016 14:08
-
-
Save tasugim/f0f6d42ecd5597e6e502 to your computer and use it in GitHub Desktop.
文字列を文字の配列に分割するVBAのカスタムファンクション
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ' 文字列を文字の配列に分割する | |
| Private Function SplitStringToArrayOfChar(str As String) As String() | |
| Dim buff() As String | |
| Dim i As Integer | |
| ReDim buff(Len(str) - 1) | |
| For i = 1 To Len(str) | |
| buff(i - 1) = Mid$(str, i, 1) | |
| Next i | |
| SplitStringToArrayOfChar = buff | |
| End Function | |
| ' 文字列をCharの配列に分割する(ASCII文字列限定版) | |
| Private Function SplitStringToArrayOfCharForAscii(str As String) As String() | |
| SplitStringToArrayOfCharForAscii = Split(StrConv(str, vbUnicode), Chr$(0)) | |
| End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment