Is that possible to create an ordered list of arrays in N开发者_开发问答otepad++ using the following:
array[] =
array[] =
array[] =
array[] =
array[] =
...
and obtain the following...
array[0] =
array[1] =
array[2] =
array[3] =
array[4] =
...
Thanks.
EDIT:
What I am actually wondering is, is there a practical way of doing it (by using replace all feature of Notepad++) using Notepad++. Not any other programming language. It is basically replace all [] symbols with ordered numbers in them.Directly in notepad++ :
- put your cursor between the two []
- Press ALT to use column editing mode and go the last row with the mouse
- Press simultaneously ALT + C to open Column / Multi Selection editor
- Fill "Number to insert" with 0 to n and press OK
It's done !!
I was not able to find a practical way of doing it in Notepad++ but there is another trick that might be used for those who have Excel installed. Create an excel spreadsheet and copy the following structures as much as you want.
array[
array[
...
array[
then from 0 to n, generate numbers in the next column and paste ] character to the adjacent column. So in the end you have
array[ 0 ]
array[ 1 ]
...
array[ n ]
now copy the above 3 columns to a notepad++ file and replace spaces with empty string..
精彩评论