cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Function to convert a string into a vector of characters

StuartBruff
23-Emerald III

Function to convert a string into a vector of characters

A function to convert a string, or vector of character codes, into a vector of characters.

This is a function I have found useful on several occasions.  An example is counting successive sequences of characters in a string (eg, for run length encoding).   A recent Community task was to count sequences of numbers in a vector, for which the function seqcount was created.   Counting characters in a string can be done using char to convert a string to a vector of characters and then applying seqcount to that vector.

Stuart

0 REPLIES 0
Announcements

Top Tags