Skip to main content

To be honest, I don't think you should do string manipulation in the contract (which is on the blockchain). A well developed-developed blockchain app should be kicked off from ana user account, not a contract. Contract initiated transactions should do simple things like transferring stuff. If you are concatenating between two strings, then treat them like the underlying array data that they are and simply push the new value on the old one.

Otherwise, for serious manipulating of strings, do it on the client side before posting it in the body of the transaction back to the blockchain. Basically, with etheriumEthereum, we're sort of like in the early stages of databases with SQL still on the horizon. Do the work outside the datapile.

To be honest, I don't think you should do string manipulation in the contract (which is on the blockchain). A well developed blockchain app should be kicked off from an user account, not a contract. Contract initiated transactions should do simple things like transferring stuff. If you are concatenating between two strings, then treat them like the underlying array data that they are and simply push the new value on the old one.

Otherwise, for serious manipulating of strings, do it on the client side before posting it in the body of the transaction back to the blockchain. Basically, with etherium we're sort of like in the early stages of databases with SQL still on the horizon. Do the work outside the datapile.

To be honest, I don't think you should do string manipulation in the contract (which is on the blockchain). A well-developed blockchain app should be kicked off from a user account, not a contract. Contract initiated transactions should do simple things like transferring stuff. If you are concatenating between two strings, then treat them like the underlying array data that they are and simply push the new value on the old one.

Otherwise, for serious manipulating of strings, do it on the client side before posting it in the body of the transaction back to the blockchain. Basically, with Ethereum, we're sort of like in the early stages of databases with SQL still on the horizon. Do the work outside the datapile.

Source Link

To be honest, I don't think you should do string manipulation in the contract (which is on the blockchain). A well developed blockchain app should be kicked off from an user account, not a contract. Contract initiated transactions should do simple things like transferring stuff. If you are concatenating between two strings, then treat them like the underlying array data that they are and simply push the new value on the old one.

Otherwise, for serious manipulating of strings, do it on the client side before posting it in the body of the transaction back to the blockchain. Basically, with etherium we're sort of like in the early stages of databases with SQL still on the horizon. Do the work outside the datapile.