From 34cb3b9b539c18df596584b4d143f4047dc66d8d Mon Sep 17 00:00:00 2001 From: mdb Date: Thu, 11 Dec 2003 06:34:08 +0000 Subject: [PATCH] Made escape() public. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1348 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../java/com/samskivert/text/MessageUtil.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/text/MessageUtil.java b/projects/samskivert/src/java/com/samskivert/text/MessageUtil.java index d47031cd..0b9ddab5 100644 --- a/projects/samskivert/src/java/com/samskivert/text/MessageUtil.java +++ b/projects/samskivert/src/java/com/samskivert/text/MessageUtil.java @@ -1,5 +1,5 @@ // -// $Id: MessageUtil.java,v 1.1 2003/12/11 06:32:18 mdb Exp $ +// $Id: MessageUtil.java,v 1.2 2003/12/11 06:34:08 mdb Exp $ package com.samskivert.text; @@ -62,6 +62,19 @@ public class MessageUtil return buf.toString(); } + /** + * Used to escape single quotes so that they are not interpreted by + * {@link MessageFormat}. As we assume all single quotes are to be + * escaped, we cannot use the characters { and + * } in our translation strings, but this is a small + * price to pay to have to differentiate between messages that will + * and won't eventually be parsed by a {@link MessageFormat} instance. + */ + public static String escape (String message) + { + return StringUtil.replace(message, "'", "''"); + } + /** * Unescapes characters that are escaped in a call to compose. */ @@ -225,17 +238,4 @@ public class MessageUtil return qualifiedKey.substring(qsidx+1); } - - /** - * Used to escape single quotes so that they are not interpreted by - * {@link MessageFormat}. As we assume all single quotes are to be - * escaped, we cannot use the characters { and - * } in our translation strings, but this is a small - * price to pay to have to differentiate between messages that will - * and won't eventually be parsed by a {@link MessageFormat} instance. - */ - protected static String escape (String message) - { - return StringUtil.replace(message, "'", "''"); - } }