/// <Summary>
/// Function for converting the fullwidth (SBC case)
/// </Summary>
/// <Param name = "input"> any string </param>
/// <Returns> fullwidth string </returns>
/// <Remarks>
/// The full-width space is 12288, and the half-width space is 32.
/// The relationship between the half-width (33-126) of other characters and the full-width (65281-65374) is as follows: the difference is 65248.
/// </Remarks>
Public String tosbc (string input)
{
// Halfwidth to fullwidth:
Char [] C = input. tochararray ();
For (INT I = 0; I <C. length; I ++)
{
If (C [I] = 32)
{
C [I] = (char) 12288;
Continue;
}
If (C [I] <127)
C [I] = (char) (C [I] + 65248 );
}
Return new string (C );
}
///
// returns a function (DBC case)
///
/// any string
/// halfwidth string
///
// The full-width space is 12288, the half-width space is 32
// the correspondence between the half-width (33-126) of other characters and the full-width (65281-65374) is: 65248 differences
//
Public String todbc (string input)
{< br> char [] C = input. tochararray ();
for (INT I = 0; I {< br> If (C [I] = 12288)
{< br> C [I] = (char) 32;
continue;
}< br> If (C [I]> 65280 & C [I] <65375)
C [I] = (char) (C [I]-65248);
}< br> return new string (c);
}