pub fn dup(&self, ctxt: &SemContext) -> Handle<Str> {
        let len = self.len();
        let mut handle = str_alloc_heap(ctxt, len);

        unsafe {
            handle.length = len;

            ptr::copy_nonoverlapping(self.data(), handle.data() as *mut u8, len);
        }

        handle
    }
// duplicate string into a new object
duplicate string into a new object
duplicate string into a new object
pub fn dup(&self, ctxt: &SemContext) -> Handle<Str> {
        let len = self.len();
        let mut handle = str_alloc_heap(ctxt, len);
        unsafe {
            handle.length = len;
            ptr::copy_nonoverlapping(self.data(), handle.data() as *mut u8, len);
        }
        handle
    }
pub fn dup ( & self , ctxt : & SemContext ) -> Handle < Str > { let len = self . len ( ) ; let mut handle = str_alloc_heap ( ctxt , len ) ; unsafe { handle . length = len ; ptr :: copy_nonoverlapping ( self . data ( ) , handle . data ( ) as * mut u8 , len ) ; } handle }
duplicate string into a new object
duplicate string into a new object
&self
ctxt
&SemContext
&self
ctxt
&SemContext