first ( number) Index of the first line of the range to delete. The fifth syntax deletes a range of lines, both indexed lines inclusive. Trying to delete a nonexistent line is an error, except for with deleterange. Supports tables which are too large to unpack and will be slightlyįaster if you have the lines in a table anyway. The fourth syntax is identical to lete(unpack(tbl)), but Indexes given must all be correct for the subtitle file's state before any The third syntax supports deleting multiple indexed lines in one call. Will move up to fill the deleted indexes, so old indexes will no longer be Remove one or more from the subtitles file. Replacing lines with lines of a different type has undefined results, and may Replacing lines uses the list cursor and will move it. line ( table) The line object table to replace with. i ( number) The line index to replace at. Replace lineĭelete the indexed line and insert the given line in its stead. Inserting lines uses the list cursor and will move it. line ( table) The line object table to insert into the subtitles file. Inserting lines into the wrong section of the subtitle file has undefined Such that old indexes will no longer be valid. Inserting lines will move lines after the inserted lines to move down in index, The first syntax, you supply a negative index. Inserts one or more lines into the subtitles file before the numbered line. The table indexĪppending a line does not move the cursor otherwise used to optimise sequential The latter function-call syntax is preferred for readability. line ( table) The line object table to append to the subtitles file. The third syntax supports appending multiple lines with one single operation. If the section does not exist, it will be created. Append lineĪppend one or more lines to the end of the appropriate section of the subtitlesįile. It isĪlways fast to access lines near the beginning or end of the file. Index close to the one you last accessed than to access one further away. Presents the subtitles as if it was an array, it internally maintains a cursor Random access is slow, but sequential access is fast. the first line in the file has index 1.Īegisub internally stores the subtitle file as a linked list, which means that i ( number) Index into the subtitles file of the line number to retrieve. line ( table) Table with data about the retrieved line. This retrieves the indexed line and creates a new table object with data about The first syntax is the preferred one, per normal Lua 5.1 coding style. num_lines ( number) Number of lines in the subtitle file. Note that this is not a constant-time lookup, but lua does cache the value if It cannot change spontaneously during the execution of a This number only changes by using the other operations on the This operation retrieves the total number of lines in the subtitle fileĬurrently. In all operation synopses andĮxamples, subtitles is used for name of the subtitles object being operated These operations are described in detail below.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |