Here you can find the source of toCharArray(String str)
Parameter | Description |
---|---|
str | a parameter |
public static final char[] toCharArray(String str)
//package com.java2s; /*//w w w. j a v a 2s . c o m * Copyright 2004 - 2008 Christian Sprajc. All rights reserved. * * This file is part of PowerFolder. * * PowerFolder is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation. * * PowerFolder is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with PowerFolder. If not, see <http://www.gnu.org/licenses/>. * * $Id: Util.java 20555 2012-12-25 04:15:08Z glasgow $ */ public class Main { /** * Safe-get for null Strings to char array conversion. * * @param str * @return String as char array. If the input is null output will be null */ public static final char[] toCharArray(String str) { if (str == null) { return null; } return str.toCharArray(); } }