Erlang/OTP Forums

Author Message

<  User Contributions  ~  Binary-based UTF-8 string handling

Allan
Posted: Sun Nov 15, 2009 2:06 pm Reply with quote
User Joined: 29 Jun 2009 Posts: 30
Header of the utf8string module:
Code:

%%%
%%% UTF-8 string functions
%%%
%%% Deals with UTF-8-encoded strings in binary representation directly (without
%%% converting them to lists).
%%% The terms "char" or "character" are used synonymous for "unicode code point"
%%% in this module.
%%%
%%% Created by Allan Wegan <allanwegan@allanwegan.de>
%%% This module, utf8string.hrl, and utf8string_tests.erl may be used by
%%% everyone for everything.
%%%
-module(utf8string).
-include_lib("utf8string/include/utf8string.hrl").

%%% Public functions:
-export([
 
  create/0, create/1,
  concatenate/1, concatenate/2,
 
  is_empty/1, is_equal/2, get_size/1, get_length/1,
 
  remove_code_point/1, remove_trailing_code_point/1,
  remove_char/1, remove_trailing_char/1,
  remove_chars/2, remove_trailing_chars/2,
 
  remove_prefix/2, remove_suffix/2,
  remove_token/2,
  replace/2, replace/3, filter/2,
 
  trim_left/1, trim_right/1, trim/1,
 
  get_pattern_private/0,
  get_pattern_control/0,
  get_pattern_lineending/0,
  get_pattern_space/0,
  get_pattern_whitespace/0,
  get_pattern_non_ascii/0,
  get_pattern_ascii_control/0,
  get_pattern_ascii_lineending/0,
  get_pattern_ascii_space/0,
  get_pattern_ascii_whitespace/0,
  get_pattern_ascii_digit/0,
  get_pattern_ascii_alpha_lower/0,
  get_pattern_ascii_alpha_upper/0,
  get_pattern_ascii_alpha/0,
  get_pattern_ascii_alphanumeric/0,

  reverse/1,

  to_binary/1, to_list/1,
  urlencode/1, urldecode/1,
  urlencode_binary/1, urldecode_binary/1,
  from_integer/2, to_integer/2
 
]).



utf8string-0.0.zip
 Description:
utf8string module, type definitions, and unit tests.

Download
 Filename:  utf8string-0.0.zip
 Filesize:  37.85 KB
 Downloaded:  1053 Time(s)

View user's profile Send private message Send e-mail ICQ Number

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum