Search notes:

PowerShell: Create a char array from a string

In PowerShell, a string can be converted to a character array with the following simple construct:
PS C:\> [char[]] 'abcde'
a
b
c
d
e
Alternatively, the string's ToChararray() can be used:
PS C:\> 'abcde'.ToCharArray()
Lastly, the -split operator can be used together with a positive look-behind and look-ahead regular expression assertion.
However, it should be noted that this operation splits the string into an array of strings, not of characters.
PS C:\> 'abcde' -split '(?<=.)(?=.)'

See also

System.String.ToCharArray

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1758199878, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/language/type/array/char/string-to-char-array(53): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78