diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-02-17 09:39:30 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-02-17 09:39:30 +0000 |
commit | c4d3d4b1a7658d4b18c2f8eddbbe4aca96cbda2d (patch) | |
tree | 47180799ce405e0612ab9cbf2e32a22607ae9043 /src/utils.c | |
parent | 757ef705ea742351f83f7bbe37dc5b15a6f24a15 (diff) |
implemented new line-wrapping routine.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@110 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c index b43af5de..74ba6100 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1464,6 +1464,21 @@ gchar *get_uri_path(const gchar *uri) return (gchar *)uri; } +gint get_uri_len(const gchar *str) +{ + const gchar *p; + + if (is_uri_string(str)) { + for (p = str; *p != '\0'; p++) { + if (!g_ascii_isgraph(*p) || strchr("()<>\"", *p)) + break; + } + return p - str; + } + + return 0; +} + /* Decodes URL-Encoded strings (i.e. strings in which spaces are replaced by * plusses, and escape characters are used) */ |