Kotlin extension function

<p>Kotlin gives the programmer the ability to&nbsp;<strong>add more functionality</strong>&nbsp;to the existing classes,&nbsp;<strong>without inheriting them</strong>. This is achieved through a feature known as&nbsp;<strong>extensions</strong>. When a function is added to an existing class it is known as&nbsp;<strong>Extension Function</strong>.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:700/1*ZMPNoDbAU8WEVXKF_EL1KA.png" style="height:455px; width:700px" /></p> <h1>How add Kotlin extension function</h1> <p>To add an extension function to a class, define a&nbsp;<strong>new function</strong>&nbsp;appended to the &ldquo;class name&rdquo;. To declare an extension function, prefix its name with a receiver type, which refers to the type being extended.</p> <h1><strong>Change &ldquo;Date&rdquo; format with extension function</strong></h1> <p><a href="https://medium.com/@abubakernetelsoft_32984/kotlin-extension-function-34b51dd18bb6"><strong>Visit Now</strong></a></p>