~osomon/moovida/plugin_dependencies_graph

« back to all changes in this revision

Viewing changes to elisa-core/elisa/core/utils/text.py

  • Committer: Olivier Tilloy
  • Date: 2009-06-04 10:32:06 UTC
  • mfrom: (1074.1.315 relook)
  • Revision ID: olivier@fluendo.com-20090604103206-6ql519mywkfcog6z
Merged the latest moovida.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
# Moovida - Home multimedia server
 
3
# Copyright (C) 2006-2009 Fluendo Embedded S.L. (www.fluendo.com).
 
4
# All rights reserved.
 
5
#
 
6
# This file is available under one of two license agreements.
 
7
#
 
8
# This file is licensed under the GPL version 3.
 
9
# See "LICENSE.GPL" in the root of this distribution including a special
 
10
# exception to use Moovida with Fluendo's plugins.
 
11
#
 
12
# The GPL part of Moovida is also available under a commercial licensing
 
13
# agreement from Fluendo.
 
14
# See "LICENSE.Moovida" in the root directory of this distribution package
 
15
# for details on that license.
 
16
#
 
17
# Author: Olivier Tilloy <olivier@fluendo.com>
 
18
 
 
19
"""
 
20
Text utilities.
 
21
"""
 
22
 
 
23
def name_to_shortcut(name):
 
24
    """
 
25
    DOCME
 
26
    """
 
27
    if name:
 
28
        first = name[0]
 
29
        if first.isalpha():
 
30
            return first.upper()
 
31
 
 
32
    return '#'
 
 
b'\\ No newline at end of file'