How to modify a Websocket frame message?

Hey guys,
I looked a lot for it, and couldn’t find anything, I want a snippet allowing me to modify a websocket frame. for example let’s say the frame message is “hello world”, I want to replace world with “dude” to make it “hello dude”.

Hello! You can look at the example code here.

I’ll try this, thanks @rjt-gupta