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
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
1
Répondre
3025
Vues
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
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire