Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3046 Weergaven

Example: I have a string "Chicken Wings" and i just the chicken word to display. Thanks in advance    ​

Avatar
Annuleer
Beste antwoord

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

Avatar
Annuleer