android 大小写转换

	private void toUpperCase(byte[] data, int start, int len)

	{

		int end = start + len;

		int dist = 'A' - 'a';

		for (int i = start; i < end; i++)

		{

			if (data[i] >= 'a' && data[i] <= 'z')

			{

				data[i] += dist;

			}

		}

	}

	

	private void toLowerCase(byte[] data, int start, int len)

	{

		int end = start + len;

		int dist = 'a' - 'A';

		for (int i = start; i < end; i++)

		{

			if (data[i] >= 'A' && data[i] <= 'Z')

			{

				data[i] += dist;

			}

		}

	}


你可能感兴趣的:(android)