In PHP templates I can use php functions, for example:
foreach ($users as $user){
echo someFunction($user->getName());
}
How can I make it in TWIG?
{% for user in users %}
* {{ user.name }}
{% else %}
No user have been found.
{% endfor %}
How do I achieve this?
What you need are functions or filters. You can easily add these using the examples.