Skip to content

Allow access to document operations in Ruby way #12

@bil-bas

Description

@bil-bas

Blip.text[1..3] = '' (delete in range)
Blip.text[1..3] = 'Frog' (set in range)
Blip.text[5] = ?a (via set in range)
Blip.text.sub!(/frog/, "Fish") (via set in range)
Blip.text[/frog/] = "Fish" (same as sub!)
Blip.text.gsub!(/frog/, "Fish") (via set in range)
Blip.text.append("Fish") (via append_text)
Blip.text << "Fish" (as append)
Blip.text = 'Frog' (set text)
Blip.text = '' (clear)
Blip.text.insert(5, '') (insert text - note that the standard Ruby string way to insert text has reversed paramters to that of insert_text as implemented; I think keeping things the same as Ruby is best, since the alternative order is just arbitrary choice by Python dev)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions