From ff0751c47677d74e738b6009c1401b5b9a88d937 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 19 Sep 2006 17:45:27 +0000
Subject: new package coolstr (18sep06)

git-svn-id: svn://tug.org/texlive/trunk@2160 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/coolstr/coolstr.sty | 169 ++++++++++++++++++++++++
 1 file changed, 169 insertions(+)
 create mode 100644 Master/texmf-dist/tex/latex/coolstr/coolstr.sty

(limited to 'Master/texmf-dist/tex/latex/coolstr/coolstr.sty')

diff --git a/Master/texmf-dist/tex/latex/coolstr/coolstr.sty b/Master/texmf-dist/tex/latex/coolstr/coolstr.sty
new file mode 100644
index 00000000000..c74aff34b76
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/coolstr/coolstr.sty
@@ -0,0 +1,169 @@
+%%
+%% This is file `coolstr.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% coolstr.dtx  (with options: `package')
+%% 
+%% This is a generated file
+%% 
+%% This file may be distributed and/or modified under the
+%% conditions of the Limited General Product License
+%% 
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{coolstr}
+ [2006/09/17 v1.0 COntent Oriented LaTeX Strings]
+\RequirePackage{ifthen}
+\RequirePackage{amsmath}
+\RequirePackage{amssymb}
+%% \CharacterTable
+%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%%   Digits        \0\1\2\3\4\5\6\7\8\9
+%%   Exclamation   \!     Double quote  \"     Hash (number) \#
+%%   Dollar        \$     Percent       \%     Ampersand     \&
+%%   Acute accent  \'     Left paren    \(     Right paren   \)
+%%   Asterisk      \*     Plus          \+     Comma         \,
+%%   Minus         \-     Point         \.     Solidus       \/
+%%   Colon         \:     Semicolon     \;     Less than     \<
+%%   Equals        \=     Greater than  \>     Question mark \?
+%%   Commercial at \@     Left bracket  \[     Backslash     \\
+%%   Right bracket \]     Circumflex    \^     Underscore    \_
+%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
+%%   Right brace   \}     Tilde         \~}
+\newcounter{COOL@strlen}%
+\newcommand{\COOL@strEnd}{\%\%\%}
+\newcommand{\COOL@intEnd}{\%@\%@\%@}
+\newcommand{\setstrEnd}[1]{\renewcommand{\COOL@strEnd}{#1}}
+\newcounter{COOL@strpointer}
+\def\COOL@strgobble[#1]#2#3{%
+\ifthenelse{\equal{#3}{\COOL@strEnd}}
+{%
+\ifthenelse{\value{COOL@strpointer}=#1}
+{%
+#2
+}%
+{%
+}%
+}%
+{%
+\ifthenelse{\value{COOL@strpointer}=#1}
+{%
+#2
+}%
+{%
+}%
+\stepcounter{COOL@strpointer}%
+\COOL@strgobble[#1]#3
+}%
+}
+\newcommand{\strchar}[2]{%
+\setcounter{COOL@strpointer}{1}%
+\COOL@strgobble[#2]#1\COOL@strEnd%
+}
+\newboolean{COOL@firstdecimalfound}
+\newboolean{COOL@seconddecimalfound}
+\newboolean{COOL@efound}
+\newboolean{COOL@digitfound}
+
+\def\COOL@numericgobbler#1#2{%
+\ifthenelse{\equal{#2}{\COOL@strEnd}}%
+{%
+\ifthenelse{`#1 < `0 \OR `#1 > `9}%
+{%
+Not Numeric%
+}%
+{%
+Is Numeric%
+}%
+}%
+{%
+\ifthenelse{ `#1 < `0 \OR `#1 > `9 }%
+{%
+\ifthenelse{ `#1 = `. }%
+{%
+\ifthenelse{ \boolean{COOL@seconddecimalfound} }%
+{%
+Not numeric%
+}%
+{%
+\ifthenelse{ \boolean{COOL@firstdecimalfound} }%
+{%
+\ifthenelse{ \boolean{COOL@efound} }%
+{%
+\setboolean{COOL@seconddecimalfound}{true}%
+\COOL@numericgobbler#2%
+}%
+{%
+Not numeric%
+}%
+}%
+{%
+\setboolean{COOL@firstdecimalfound}{true}%
+\COOL@numericgobbler#2%
+}%
+}%
+}%
+{%
+\ifthenelse{ \(`#1 = `E\) \OR \(`#1 = `e\) }%
+{%
+\ifthenelse{ \boolean{COOL@efound} \OR \NOT \boolean{COOL@digitfound} }%
+{%
+Not numeric%
+}%
+{%
+\setboolean{COOL@efound}{true}%
+\COOL@numericgobbler#2%
+}%
+}%
+{%
+Not Numeric
+}%
+}%
+}%
+{%
+\setboolean{COOL@digitfound}{true}%
+\COOL@numericgobbler#2%
+}%
+}%
+}
+\newcommand{\isnumeric}[1]{%
+\setboolean{COOL@firstdecimalfound}{false}%
+\setboolean{COOL@seconddecimalfound}{false}%
+\setboolean{COOL@efound}{false}%
+\setboolean{COOL@digitfound}{false}%
+\COOL@numericgobbler#1\COOL@strEnd%
+}
+\let\COOL@strStop=\relax
+\newboolean{COOL@isint}
+\def\COOL@intgobbler#1#2\COOL@strEnd{%
+\ifcat#11
+\ifthenelse{\equal{#2}{\COOL@strStop}}%
+{%
+\ifthenelse{`#1 < `0 \OR `#1 > `9}%
+{%
+\setboolean{COOL@isint}{false}%
+}%
+{%
+\setboolean{COOL@isint}{true}%
+}%
+}%
+{%
+\ifthenelse{ `#1 < `0 \OR `#1 > `9 }%
+{%
+\setboolean{COOL@isint}{false}%
+}%
+{%
+\setboolean{COOL@digitfound}{true}%
+\COOL@intgobbler#2\COOL@strEnd%
+}%
+}%
+\else
+\setboolean{COOL@isint}{false}%
+\fi
+}
+\newcommand{\isint}[1]{\COOL@intgobbler#1\COOL@strStop\COOL@strEnd}
+\endinput
+%%
+%% End of file `coolstr.sty'.
-- 
cgit v1.2.3

