Example: I have a string "Chicken Wings" and i just the chicken word to display. Thanks in advance
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
1
Rispondi
3024
Visualizzazioni
Hi,
Try some_string.split(' ', 1)[0] or some_string.partition(' ')[0] , wheresome_string is your string of field holding the string value.
Source: https://stackoverflow.com/questions/13750265/how-to-get-the-first-word-in-the-string
Thanks
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati