• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16export function add(a, b)
17{
18    return a + b;
19}
20
21var a = "abcdwodehhhhjjjjkkkkkooodfjsar";
22var a1 = a.substring(4, 28);
23var b = "efgh"
24var c = "我的bbb";
25var d = "你的";
26var a2 = a + b;
27var a3 = a + c;
28var a4 = c + d;
29var a5 = a1 + d;
30var a6 = a2 + a5;
31var a7 = d.toLowerCase() + a1.substring(1);
32var a8 = a2.toUpperCase() + a3.substring(2);
33var a9 = a7 + a8;
34print(a1);
35print(a2);
36print(a3);
37print(a4);
38print(a5);
39print(a6);
40print(a7);
41print(a8);
42print(a9);