cdm/src/main/java/ucar/ma2/ArrayChar.java
public void setString(String val) {
    int rank = getRank();
    if (rank != 1)
      throw new IllegalArgumentException("ArayChar.setString rank must be 1");
    int arrayLen = indexCalc.getShape(0);
    int strLen = Math.min(val.length(), arrayLen);

    for (int k = 0; k < strLen; k++)
      storage[k] = val.charAt(k);

    char c = 0;
    for (int k = strLen; k < arrayLen; k++)
      storage[k] = c;
  }
public void setString(String val) {
    int rank = getRank();
    if (rank != 1)
      throw new IllegalArgumentException("ArayChar.setString rank must be 1");
    int arrayLen = indexCalc.getShape(0);
    int strLen = Math.min(val.length(), arrayLen);

    for (int k = 0; k < strLen; k++)
      storage[k] = val.charAt(k);

    char c = 0;
    for (int k = strLen; k < arrayLen; k++)
      storage[k] = c;
  }
public void setString ( String val ) { int rank = getRank ( ) ; if ( rank != 1 ) throw new IllegalArgumentException ( "ArayChar.setString rank must be 1" ) ; int arrayLen = indexCalc . getShape ( 0 ) ; int strLen = Math . min ( val . length ( ) , arrayLen ) ; for ( int k = 0 ; k < strLen ; k ++ ) storage [ k ] = val . charAt ( k ) ; char c = 0 ; for ( int k = strLen ; k < arrayLen ; k ++ ) storage [ k ] = ; }
Set the ArrayChar values from the characters in the String. Rank must be 1.
If String longer than ArrayChar, ignore extra chars; if shorter, fill with 0.

@param val set characters from this String
@throws IllegalArgumentException if rank != 2
Set the ArrayChar values from the characters in the String . Rank must be 1 . If String longer than ArrayChar ignore extra chars ; if shorter fill with 0 .