Hi, I didn't really know how to word the title, but I was just wondering if it was possible to write a function and make it accessible as if it was any other str function. It was a simple (but useful) few lines which returned a list of all the occurrences of a substring within a string. I'd have to call it by findAll( string, substring )
, but I would like to be able to call it like the built-in find function, i.e. string.findAll( substring )
. Is this possible? Thanks!
shadwickman 159 Posting Pro in Training
Gribouillis 1,391 Programming Explorer Team Colleague
shadwickman commented: Great idea to create my own str class! +2
shadwickman 159 Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.