Code Monkey home page Code Monkey logo

replaceline's Introduction

ReplaceLine

Description: Replace a Line in a Text File.

AUTHOR: Kvc & Anic17

USAGE

Call ReplaceLine [File] [LineNumber] [NewLineContent]

โ€‹ Examples: ReplaceLine "Demo.txt" 5 "This is replaced Line."


There are 2 MODES to GET the results... MODE 1: GO INSIDE THE FILE, AND EDIT THAT LINE... MODE 2: REPLACE THAT LINE INSIDE THE FILE...

SYNTAX:

ReplaceLine will automatically, select the MODE whichever is faster for your Given conditions

INFO ABOUT THE MODES: [GET MAX OUT OF THIS UTILITIY] MODE 1 is much faster than MODE 2, as in MODE 2 - we create a new separate file and add the modified line to it at right place and then overwrite existing file (that is why, REPLACE LINE...)

AND

in MODE 1 - we are going to that line and changing its content and exiting, no recreation of the entire file with 99% unchanged rows But, to invoke MODE 1 - it requires 1 special condition as FOLLOWS: CONDITION: Make Sure that the New line must have the same length as of previous line in the file, for compatibility... and you can check the Older line with 'ReadLine' Utility & extract its length with 'getlen'.

For Example: Replacing "Kvc" with "abc" will invoke Method 1.

For Example: Replacing "Kvc" with "TheKvc" will invoke Method 2.

"Notice, the number of characters in both cases."

NOTE: This utility will always choose the most efficient mode to complete the required action.


replaceline's People

Contributors

thekvc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.