GRASS Programmer's Manual  6.4.2(2012)
strings.c File Reference

GIS Library - string/chring movement functions. More...

#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <sys/types.h>
#include <grass/gis.h>
Include dependency graph for strings.c:

Go to the source code of this file.

Defines

#define NULL   0

Functions

char * G_strcpy (char *T, const char *F)
 Copies characters from the string F into the string T.
char * G_chrcpy (char *T, const char *F, int n)
 Copies characters from the string F into the string T.
char * G_strncpy (char *T, const char *F, int n)
 This function is similar to G_chrcpy() but always copies at least n characters into the string T.
char * G_strmov (char *T, const char *F)
 Copies characters from the string F (not including the terminating null character) into the string T.
char * G_chrmov (char *T, const char *F, int n)
 This copies characters from the string F (exactly n characters) into the string T.
char * G_strcat (char *T, const char *F)
 This copies characters from the string F into the string T.
char * G_chrcat (char *T, const char *F, int n)
 This function is like G_strcat() except that not more than n characters from F are appended to the end of T.
int G_strcasecmp (const char *x, const char *y)
 String compare ignoring case (upper or lower)
char * G_strstr (const char *mainString, const char *subString)
 Finds the first occurrence of the character C in the null-terminated string beginning at mainString.
char * G_strdup (const char *string)
 Copies the null-terminated string into a newly allocated string. The string is allocated using G_malloc().
char * G_strchg (char *bug, char character, char new)
 Replace all occurencies of character in string bug with new.
char * G_str_replace (char *buffer, const char *old_str, const char *new_str)
 Replace all occurencies of old_str in buffer with new_str.
int G_strip (char *buf)
 Removes all leading and trailing white space from string.
char * G_chop (char *line)
 Chop leading and trailing white spaces:
void G_str_to_upper (char *str)
 Convert string to upper case.
void G_str_to_lower (char *str)
 Convert string to lower case.
int G_str_to_sql (char *str)
 Make string SQL compliant.

Detailed Description

GIS Library - string/chring movement functions.

Todo:
merge interesting functions from ../datetime/scan.c here

(C) 1999-2008 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author:
Dave Gerdes (USACERL), Michael Shapiro (USACERL), Amit Parghi (USACERL), Bernhard Reiter (Intevation GmbH, Germany) and many others

Definition in file strings.c.


Define Documentation

#define NULL   0

Definition at line 26 of file strings.c.

Referenced by add_link(), alloc_slice_buff(), alloc_vol_buff(), anderson_darling(), anderson_darling_exp(), append_item(), avl_assert_delete(), avl_assert_insert(), avl_copy(), avl_create(), avl_delete(), avl_destroy(), avl_find(), avl_free(), avl_insert(), avl_malloc(), avl_probe(), avl_replace(), avl_t_copy(), avl_t_cur(), avl_t_find(), avl_t_first(), avl_t_init(), avl_t_insert(), avl_t_last(), avl_t_next(), avl_t_prev(), avl_t_replace(), basename(), bin_install(), binaries_exist(), BM_create(), BM_create_sparse(), BM_destroy_sparse(), BM_dump_map_row_sparse(), BM_dump_map_sparse(), BM_file_read(), BM_file_write_sparse(), BM_get_map_size_sparse(), BM_get_sparse(), BM_set_sparse(), btree_create(), btree_update(), Cairo_Driver(), Cairo_Graph_close(), check_dependencies(), check_extension(), check_filetype(), chi_square(), chi_square_exp(), clean_dir(), correct_twist(), cramer_von_mises(), cramer_von_mises_exp(), create_pad(), create_si_struct(), D_draw_raster_RGB(), D_popup(), dagostino_d(), db__add_cursor_to_driver_state(), db__close_all_cursors(), db__copy_table(), db__drop_cursor_from_driver_state(), db__recv_double_array(), db__recv_float_array(), db__recv_index_array(), db__recv_int_array(), db__recv_short_array(), db__recv_string_array(), db__recv_table_definition(), db_alloc_cursor_column_flags(), db_alloc_cursor_table(), db_alloc_dirent_array(), db_alloc_index_columns(), db_alloc_table(), db_calloc(), db_CatValArray_get_value(), db_CatValArray_get_value_double(), db_CatValArray_get_value_int(), db_CatValArray_init(), db_copy_table(), db_copy_table_by_ints(), db_copy_table_select(), db_copy_table_where(), db_create_index2(), db_d_bind_update(), db_d_close_cursor(), db_d_delete(), db_d_insert(), db_d_open_insert_cursor(), db_d_open_select_cursor(), db_d_open_update_cursor(), db_d_update(), db_delete_table(), db_dirent(), db_double_quote_string(), db_driver(), db_enlarge_string(), db_error(), db_free_cursor_column_flags(), db_get_column(), db_get_default_database_name(), db_get_default_driver_name(), db_get_default_group_name(), db_get_default_schema_name(), db_get_error_msg(), db_get_index_column_name(), db_get_login(), db_get_table_column(), db_has_dbms(), db_init_cursor(), db_init_index(), db_list_drivers(), db_malloc(), db_new_token(), db_read_dbmscap(), db_realloc(), db_select_CatValArray(), db_select_int(), db_select_value(), db_shutdown_driver(), db_start_driver(), db_start_driver_open_database(), db_table_exists(), DBFClose(), DBFCreateLL(), DBFGetFieldIndex(), DBFGetFieldInfo(), DBFIsAttributeNULL(), DBFOpenLL(), DBFReadDoubleAttribute(), DBFReadIntegerAttribute(), DBFWriteNULLAttribute(), delete_item(), delete_pad(), delete_str(), depstr(), deregister_entries_gisman(), deregister_entries_gisman2(), deregister_extension(), deregister_html(), DGL_ADD_EDGE_FUNC(), DGL_ADD_NODE_FUNC(), DGL_DEL_EDGE_FUNC(), DGL_DEL_NODE_FUNC(), DGL_DEL_NODE_INEDGE_FUNC(), DGL_DEL_NODE_OUTEDGE_FUNC(), dgl_edge_prioritizer_add(), dgl_edge_prioritizer_del(), DGL_EDGE_T_FIRST_FUNC(), DGL_EDGE_T_INITIALIZE_FUNC(), DGL_EDGE_T_NEXT_FUNC(), DGL_EDGE_T_RELEASE_FUNC(), DGL_EDGESET_T_FIRST_FUNC(), DGL_EDGESET_T_NEXT_FUNC(), DGL_FLATTEN_FUNC(), DGL_GET_EDGE_FUNC(), DGL_GET_NODE_FUNC(), DGL_GET_NODE_INEDGESET_FUNC(), DGL_GET_NODE_OUTEDGESET_FUNC(), dgl_initialize_V1(), dgl_initialize_V2(), dgl_mempop(), dgl_mempush(), DGL_NODE_T_FIND_FUNC(), DGL_NODE_T_FIRST_FUNC(), DGL_NODE_T_INITIALIZE_FUNC(), DGL_NODE_T_NEXT_FUNC(), DGL_NODE_T_RELEASE_FUNC(), dgl_read_V1(), dgl_read_V2(), DGL_SP_CACHE_INITIALIZE_FUNC(), DGL_SP_CACHE_RELEASE_FUNC(), DGL_SPAN_DEPTHFIRST_SPANNING_FUNC(), DGL_SPAN_MINIMUM_SPANNING_FUNC(), DGL_UNFLATTEN_FUNC(), dglAddEdge(), dglDepthComponents(), dglDepthSpanning(), dglEdge_T_First(), dglEdge_T_Next(), dglEdgeGet_Attr(), dglEdgeGet_Head(), dglEdgeGet_Tail(), dglEdgeset_T_First(), dglEdgeset_T_Next(), dglGetEdge(), dglGetNode(), dglHeapFree(), dglHeapInit(), dglHeapInsertMax(), dglHeapInsertMin(), dglInitialize(), dglIOContextInitialize(), dglNode_T_Find(), dglNode_T_First(), dglNode_T_Next(), dglNodeGet_Attr(), dglNodeGet_InEdgeset(), dglNodeGet_OutEdgeset(), dglReadChunk(), dglShortestDistance(), dglShortestPath(), dglTreeEdgeAdd(), dglTreeEdgePri32Add(), dglTreeNode2Add(), dglTreeNodeAdd(), dglTreeNodePri32Add(), dglTreePredistAdd(), dglTreeTouchI32Add(), dglWriteChunk(), dig_add_area(), dig_add_isle(), dig_alloc_area(), dig_alloc_areas(), dig_alloc_isle(), dig_alloc_isles(), dig_alloc_line(), dig_alloc_lines(), dig_alloc_node(), dig_alloc_nodes(), dig_alloc_space(), dig_angle_next_line(), dig_area_add_isle(), dig_area_alloc_isle(), dig_area_alloc_line(), dig_area_del_isle(), dig_build_area_with_line(), dig_cidx_add_cat(), dig_cidx_add_cat_sorted(), dig_cidx_del_cat(), dig_cidx_free(), dig_del_area(), dig_del_isle(), dig_del_line(), dig_falloc(), dig_file_init(), dig_file_load(), dig_frealloc(), dig_free_plus_areas(), dig_free_plus_isles(), dig_free_plus_lines(), dig_free_plus_nodes(), dig_init_list(), dig_init_plus(), dig_isle_alloc_line(), dig_list_add(), dig_node_alloc_line(), dig_Rd_P_area(), dig_Rd_P_isle(), dig_Rd_P_line(), dig_Rd_P_node(), dig_read_cidx_head(), dig_read_frmt_ascii(), dig_spidx_del_area(), dig_which_node(), dig_Wr_P_area(), dig_Wr_P_isle(), dig_Wr_P_line(), dig_Wr_P_node(), dmax(), dmax_exp(), dump_ascii(), dump_html(), dump_plain(), dump_str(), dumplist(), durbins_exact(), E_edit_cats(), E_edit_fp_cats(), err(), exit_tmp(), F_generate(), F_open(), find_item(), find_pad(), find_pos(), free_data_buffs(), free_datum_list(), free_ellps_list(), free_freetypecap(), free_volfile_buffs(), G3d_adjustRegion(), G3d_adjustRegionRes(), G3d_allocTiles(), G3d_allocTilesType(), G3d_cache_dispose(), G3d_cache_elt_ptr(), G3d_cache_get_elt(), G3d_cache_hash_dispose(), G3d_cache_hash_new(), G3d_cache_load(), G3d_cache_new(), G3d_cache_new_read(), G3d_cache_put_elt(), G3d_changePrecision(), G3d_changeType(), G3d_compareFiles(), G3d_fillHeader(), G3d_flushIndex(), G3d_flushTile(), G3d_getBlockNocache(), G3d_getCompressionMode(), G3d_getDoubleRegion(), G3d_getFloatRegion(), G3d_getTilePtr(), G3d_getWindowParams(), G3d_initDefaults(), G3d_initFpXdr(), G3d_initIndex(), G3d_keyGetDouble(), G3d_keyGetInt(), G3d_keyGetString(), G3d_keyGetValue(), G3d_makeAlignedVolumeFile(), G3d_malloc(), G3d_maskFileExists(), G3d_maskOpenOld(), G3d_openCellNew(), G3d_openCellOld(), G3d_openCellOldNoHeader(), G3d_putDouble(), G3d_putFloat(), G3d_readWindow(), G3d_realloc(), G3d_retile(), G3d_setWindowParams(), G3d_tileLoad(), G3d_writeAscii(), G3d_writeCats(), G__check_fp_type(), G__color_free_rules(), G__create_alt_env(), G__env_name(), G__get_window(), G__lookup_colors(), G__ls(), G__make_location(), G__make_mapset(), G__mapset_name(), G__oldsite_get(), G__open_cell_old(), G__projection_name(), G__quant_get_rule_for_d_raster_val(), G__raster_misc_read_line(), G__raster_misc_write_line(), G__read_Cell_head_array(), G__set_gisrc_file(), G__temp_element(), G__unit_name(), G__write_cats(), G_adjust_Cell_head(), G_adjust_Cell_head3(), G_ask_any(), G_ask_datum_name(), G_ask_ellipse_name(), G_ask_in_mapset(), G_ask_new(), G_ask_new_file(), G_ask_old(), G_ask_old_file(), G_ask_proj_name(), G_available_mapsets(), G_check_input_output_name(), G_color_name(), G_compare_projections(), G_copy_file(), G_create_key_value(), G_database_datum_name(), G_database_units_to_meters_factor(), G_datum_description(), G_datum_ellipsoid(), G_datum_name(), G_debug(), G_define_flag(), G_define_option(), G_ellipsoid_description(), G_ellipsoid_name(), G_find_file(), G_find_file2(), G_find_key_value(), G_fread_key_value(), G_free_fmatrix(), G_free_fvector(), G_free_histogram(), G_free_imatrix(), G_free_ivector(), G_free_matrix(), G_free_raster_cats(), G_free_reclass(), G_free_tokens(), G_free_vector(), G_get_3dview(), G_get_ask_return_msg(), G_get_cellhd(), G_get_datumparams_from_projinfo(), G_get_ellipsoid_parameters(), G_get_gdal_link(), G_get_next_marked_d_raster_cat(), G_get_projinfo(), G_get_projunits(), G_get_raster_cat(), G_get_reclass(), G_getenv(), G_getenv2(), G_gishelp(), G_home(), G_index(), G_init_colors(), G_init_histogram(), G_init_raster_cats(), G_is_reclass(), G_is_reclassed_to(), G_list(), G_make_random_colors(), G_mapset(), G_number_of_tokens(), G_oldsite_describe(), G_parser(), G_percent2(), G_plot_area(), G_put_3dview(), G_put_reclass(), G_putenv(), G_rc_path(), G_read_color_rules(), G_read_histogram(), G_read_history(), G_read_key_value_file(), G_read_range(), G_recreate_command(), G_remove(), G_rindex(), G_set_d_raster_cat(), G_set_key_value(), G_set_raster_cats_title(), G_site_format(), G_site_get(), G_site_get_head(), G_site_new_struct(), G_site_put(), G_site_put_head(), G_sites_open_old(), G_spawn(), G_str_replace(), G_strdup(), G_strstr(), G_system(), G_tokenize(), G_unset_percent_routine(), G_usage(), G_vasprintf(), G_whoami(), G_write_histogram(), G_write_histogram_cs(), G_write_key_value_file(), get_2key_neighbors(), get_configure_options(), get_key_data(), get_key_neighbors(), get_package_name(), GK_add_key(), GK_clear_keys(), gk_copy_key(), gk_draw_path(), gk_make_framesfromkeys(), gk_make_linear_framesfromkeys(), GK_print_keys(), GK_update_frames(), GnoFree(), GnoParse(), GP_attmode_color(), GP_attmode_none(), gp_free_site(), gp_free_sitemem(), GP_Get_ClientData(), gp_get_last_site(), gp_get_new_site(), gp_get_prev_site(), gp_get_site(), GP_get_site_list(), GP_get_sitemode(), GP_get_sitename(), GP_get_zmode(), GP_load_site(), Gp_load_sites(), gp_set_defaults(), GP_set_sitemode(), GP_set_zmode(), GP_site_exists(), gp_update_drapesurfs(), gpd_2dsite(), gpd_3dsite(), GPJ__get_datum_params(), GPJ__get_ellipsoid_params(), GPJ_ask_datum_params(), GPJ_get_datum_by_name(), GPJ_get_datum_transform_by_name(), GPJ_get_default_datum_params_by_name(), GPJ_get_ellipsoid_by_name(), GPJ_get_ellipsoid_params(), GPJ_get_equivalent_latlong(), GPJ_grass_to_osr(), GPJ_grass_to_wkt(), GPJ_osr_to_grass(), GPJ_set_csv_loc(), GPJ_wkt_to_grass(), GS_coordpair_repeats(), gs_distance_onsurf(), GS_draw_cplane_fence(), GS_draw_X(), gs_free_surf(), gs_get_att_typbuff(), GS_get_cat_at_xy(), Gs_get_cat_label(), GS_Get_ClientData(), GS_get_distance_alongsurf(), gs_get_last_surface(), gs_get_new_surface(), GS_get_norm_at_xy(), gs_get_prev_surface(), gs_get_surf(), GS_get_surf_list(), GS_get_val_at_xy(), GS_get_zextents(), gs_init(), gs_init_surf(), Gs_load_3dview(), GS_load_att_map(), gs_los_intersect(), gs_los_intersect1(), gs_malloc_lookup(), Gs_save_3dview(), gs_set_att_src(), gs_set_defaults(), GS_surf_exists(), GS_transp_is_set(), GS_unset_SDsurf(), Gs_update_attrange(), gs_update_curmask(), GS_write_ppm(), GS_write_tif(), GS_write_zoom(), gsd_arrow(), gsd_init_mpeg(), gsd_put_legend(), gsd_surf_const(), gsd_wire_surf_const(), gsdiff_get_SDref(), gsdrape_get_allsegments(), gsdrape_get_segments(), gsdrape_set_surface(), gsds_alloc_typbuff(), gsds_free_datah(), gsds_get_name(), gsds_get_typbuff(), gsds_newh(), gv_decimate_lines(), gv_free_vect(), gv_free_vectmem(), GV_Get_ClientData(), gv_get_last_vect(), gv_get_new_vect(), gv_get_prev_vect(), gv_get_vect(), GV_get_vect_list(), GV_get_vectmode(), GV_get_vectname(), Gv_load_vect(), GV_load_vector(), gv_set_defaults(), GV_set_vectmode(), gv_update_drapesurfs(), GV_vect_exists(), gvd_vect(), gvl_file_free_datah(), gvl_file_get_name(), gvl_file_get_volfile(), gvl_file_newh(), gvl_file_set_mode(), gvl_free_vol(), GVL_Get_ClientData(), gvl_get_last_vol(), gvl_get_new_vol(), gvl_get_prev_vol(), gvl_get_vol(), GVL_get_vol_list(), GVL_get_volname(), gvl_init_vol(), gvl_isosurf_calc(), gvl_isosurf_get_isosurf(), gvl_isosurf_init(), Gvl_load_colors_data(), GVL_load_vol(), GVL_slice_add(), gvl_slice_get_slice(), gvl_slice_init(), GVL_vol_exists(), I_alloc_double2(), I_alloc_double3(), I_alloc_int2(), I_cluster_begin(), I_cluster_clear(), I_cluster_exec_allocate(), I_cluster_exec_free(), I_find_group(), I_find_group_file(), I_find_subgroup(), I_find_subgroup_file(), I_fopen_group_file_old(), I_fopen_sigset_file_new(), I_fopen_sigset_file_old(), I_fopen_subgroup_file_old(), I_free(), I_free_double2(), I_free_double3(), I_free_int2(), I_get_control_points(), I_get_group(), I_get_group_title(), I_get_subgroup(), I_get_target(), I_init_group_ref(), I_init_ref_color_nums(), I_init_signatures(), I_InitSigSet(), I_list_groups(), I_list_subgroups(), I_NewClassSig(), I_put_control_points(), I_put_group(), I_put_group_title(), I_put_subgroup(), I_put_target(), I_SetClassTitle(), I_SetSigTitle(), if(), IL_check_at_points_2d(), IL_create_bitmask(), IL_grid_calc_2d(), IL_interp_segments_2d(), IL_matrix_create(), IL_output_2d(), IL_resample_interp_segments_2d(), IL_resample_output_2d(), IL_secpar_loop_2d(), IL_vector_input_data_2d(), IL_write_temp_2d(), insert_str(), invent_pad(), is_submenu(), LIB_main(), link_cleanup(), link_destroy(), link_dispose(), link_init(), link_new(), list_binaries(), list_extensions(), LOC_open_driver(), LOC_pad_append_item(), LOC_pad_create(), LOC_pad_current(), LOC_pad_delete(), LOC_pad_delete_item(), LOC_pad_get_item(), LOC_pad_list_items(), LOC_pad_select(), LOC_pad_set_item(), main(), MAIN(), make_location(), make_mapset(), MT_divide(), MT_functions_new(), MT_insert(), MT_region_data(), MT_tree_info_new(), MT_tree_new(), N_add_spvector_to_les(), N_alloc_array_2d(), N_alloc_array_3d(), N_alloc_geom_data(), N_alloc_gwflow_data2d(), N_alloc_gwflow_data3d(), N_alloc_les_param(), N_alloc_solute_transport_data2d(), N_alloc_solute_transport_data3d(), N_assemble_les_2d_param(), N_assemble_les_3d_param(), N_callback_solute_transport_2d(), N_callback_solute_transport_3d(), N_compute_gradient_field_2d(), N_compute_gradient_field_3d(), N_create_gradient_neighbours_2d(), N_create_gradient_neighbours_3d(), N_free_array_2d(), N_free_array_3d(), N_free_geom_data(), N_free_gradient_2d(), N_free_gradient_3d(), N_free_gradient_field_2d(), N_free_gradient_field_3d(), N_free_gradient_neighbours_2d(), N_free_gradient_neighbours_3d(), N_free_gradient_neighbours_x(), N_free_gradient_neighbours_y(), N_free_gradient_neighbours_z(), N_free_gwflow_data2d(), N_free_gwflow_data3d(), N_free_solute_transport_data2d(), N_free_solute_transport_data3d(), N_free_spvector(), N_get_array_2d_value(), N_get_array_3d_value(), N_get_gradient_neighbours_2d(), N_init_geom_data_2d(), N_init_geom_data_3d(), N_is_array_2d_value_null(), N_is_array_3d_value_null(), N_les_pivot_create(), N_math_array_2d(), N_math_array_3d(), N_put_array_2d_value(), N_put_array_2d_value_null(), N_put_array_3d_value(), N_put_array_3d_value_null(), N_read_rast3d_to_array_3d(), N_read_rast_to_array_2d(), N_write_array_2d_to_rast(), N_write_array_3d_to_rast3d(), nc_fgets(), nc_fgets_html(), nc_fgets_nb(), NetA_articulation_points(), NetA_betweenness_closeness(), NetA_distance_from_points(), NetA_find_path(), NetA_flow(), NetA_get_node_costs(), NetA_init_timetable_from_db(), NetA_points_to_nodes(), NetA_timetable_shortest_path(), NetA_varray_to_nodes(), new_chain(), new_item(), new_line(), new_part(), new_symbol(), Nviz_create_render_window(), Nviz_destroy_data(), Nviz_init_data(), Nviz_init_render_window(), Nviz_new_fringe(), Nviz_new_map_obj(), Nviz_set_fringe(), open_g3d_file(), open_volfile(), parse_freetypecap(), pg_create_struct(), pj_do_transform(), pj_get_kv(), pj_get_string(), pj_print_proj_params(), PNG_Driver(), print_cfg(), process_command(), PS_Driver(), quad_add_data(), quad_compare(), quad_data_new(), quad_divide_data(), quad_division_check(), quad_point_new(), R_parse_monitorcap(), read_cube(), read_datum_table(), read_ellipsoid_table(), read_file(), read_png(), register_entries_gisman(), register_entries_gisman2(), register_extension(), register_html(), BasicMinMaxHeap< T >::reset(), reset_values(), restore(), restore_entries_gisman(), restore_html(), rowio_get(), rowio_release(), rowio_setup(), royston(), RTreeAddBranch(), RTreeDeleteRect1(), RTreeInsertRect1(), run_post(), S_read(), segment_setup(), set_proj_lib(), shapiro_francia(), shapiro_wilk(), SHPClose(), SHPCreateLL(), SHPDestroyObject(), SHPGetInfo(), SHPOpenLL(), SHPWriteHeader(), SimpleErrorMessage(), source_install(), sqpAllocCol(), sqpAllocVal(), sqpAssignment(), sqpInitParser(), sqpInitValue(), sqpValue(), submit(), tavl_assert_delete(), tavl_assert_insert(), tavl_copy(), tavl_create(), tavl_delete(), tavl_destroy(), tavl_find(), tavl_free(), tavl_insert(), tavl_malloc(), tavl_probe(), tavl_replace(), tavl_t_copy(), tavl_t_cur(), tavl_t_find(), tavl_t_first(), tavl_t_init(), tavl_t_insert(), tavl_t_last(), tavl_t_next(), tavl_t_prev(), tavl_t_replace(), Tcl_AppInit(), test_install(), translate_quad(), uninstall(), V1_open_new_nat(), V1_open_old_nat(), V1_open_old_ogr(), V1_read_next_line_ogr(), V2_close_ogr(), V2_delete_line_nat(), V2_open_old_ogr(), V2_read_line_nat(), V2_read_line_ogr(), V2_read_next_line_nat(), V2_restore_line_nat(), V__dump_window(), V_exit(), Vect__init_head(), Vect__new_line_struct(), Vect__open_old(), Vect__read_head(), Vect__write_head(), Vect_add_dblink(), Vect_area_alive(), Vect_break_lines(), Vect_break_lines_list(), Vect_break_polygons(), Vect_build_line_area(), Vect_build_nat(), Vect_build_ogr(), Vect_cat_in_array(), Vect_check_input_output_name(), Vect_chtype_dangles(), Vect_cidx_open(), Vect_cidx_save(), Vect_clean_small_angles_at_nodes(), Vect_close(), Vect_copy(), Vect_copy_pnts_to_xyz(), Vect_copy_table(), Vect_copy_table_by_cats(), Vect_copy_tables(), Vect_copy_xyz_to_pnts(), Vect_default_field_info(), Vect_delete(), Vect_destroy_list(), Vect_find_line(), Vect_find_line_list(), Vect_get_area_boundaries(), Vect_get_area_box(), Vect_get_area_cat(), Vect_get_area_cats(), Vect_get_area_centroid(), Vect_get_area_isle(), Vect_get_area_num_isles(), Vect_get_area_points(), Vect_get_area_points_geos(), Vect_get_column_names(), Vect_get_column_names_types(), Vect_get_column_types(), Vect_get_dblink(), Vect_get_field(), Vect_get_isle_area(), Vect_get_isle_boundaries(), Vect_get_isle_box(), Vect_get_isle_points(), Vect_get_line_areas(), Vect_get_line_box(), Vect_get_line_cat(), Vect_get_line_nodes(), Vect_get_line_offset(), Vect_get_node_coor(), Vect_get_point_in_area(), Vect_get_point_in_poly(), Vect_graph_shortest_path(), Vect_hist_copy(), Vect_hist_read(), Vect_hist_rewind(), Vect_isle_alive(), Vect_isle_find_area(), Vect_legal_filename(), Vect_line_alive(), Vect_line_buffer(), Vect_line_buffer2(), Vect_line_check_intersection(), Vect_line_distance(), Vect_line_segment(), Vect_line_to_geos(), Vect_list_append(), Vect_list_append_list(), Vect_list_delete(), Vect_list_delete_list(), Vect_net_build_graph(), Vect_net_nearest_nodes(), Vect_net_shortest_path(), Vect_net_shortest_path_coor(), Vect_net_shortest_path_coor2(), Vect_new_cat_list(), Vect_new_cats_struct(), Vect_new_dblinks_struct(), Vect_new_line_struct(), Vect_new_list(), Vect_new_varray(), Vect_node_alive(), Vect_open_new(), Vect_open_spatial_index(), Vect_open_topo(), Vect_open_update(), Vect_open_update_head(), Vect_overlay_and(), Vect_point_in_area(), Vect_point_in_area_outer_ring(), Vect_point_in_island(), Vect_point_on_line(), Vect_read_dblinks(), Vect_read_line_geos(), Vect_remove_dangles(), Vect_remove_small_areas(), Vect_rename(), Vect_save_spatial_index(), Vect_save_topo(), Vect_select_areas_by_polygon(), Vect_select_dangles(), Vect_select_lines_by_box(), Vect_select_lines_by_polygon(), Vect_set_varray_from_cat_list(), Vect_set_varray_from_db(), Vect_snap_lines(), Vect_snap_lines_list(), Vect_str_to_cat_list(), Vect_subst_var(), Vect_topo_dump(), Vect_val_in_list(), Vect_write_dblinks(), Vedit_add_vertex(), Vedit_bulk_labeling(), Vedit_merge_lines(), Vedit_move_vertex(), Vedit_render_map(), Vedit_snap_point(), Vedit_split_lines(), watson_u2(), watson_u2_exp(), weisberg_bingham(), write_file(), write_png(), yylex_destroy(), yyparse(), yypop_buffer_state(), and yypush_buffer_state().


Function Documentation

char* G_chop ( char *  line)

Chop leading and trailing white spaces:

space, \f, \n, \r, \t, \v 

modified copy of G_squeeze(); RB March 2000 <Radim.Blazek@dhv.cz>

Parameters:
linebuffer to be worked on
Returns:
pointer to string

Definition at line 418 of file strings.c.

Referenced by dig_read_frmt_ascii(), G_parse_color_rule(), G_str_to_color(), get_key_data(), main(), read_coor(), read_file(), S_read(), Vect_get_column_names(), Vect_get_column_names_types(), Vect_get_column_types(), and Vect_read_dblinks().

char* G_chrcat ( char *  T,
const char *  F,
int  n 
)

This function is like G_strcat() except that not more than n characters from F are appended to the end of T.

This function is similar to G_strcpy(), except that the characters from F are concatenated or appended to the end of T, instead of overwriting it. That is, the first character from F overwrites the null character marking the end of T.

Parameters:
[out]Ttarget string
[in]Fsource string
[in]nnumber of character to copy
Returns:
T value

Definition at line 174 of file strings.c.

References G_chrcpy().

char* G_chrcpy ( char *  T,
const char *  F,
int  n 
)

Copies characters from the string F into the string T.

Copies just the first n characters from the string F. At the end the null terminator is written into the string T.

Parameters:
[out]Ttarget string
[in]Fsource string
[in]nnumber of characters to copy
Returns:
T value

Definition at line 66 of file strings.c.

Referenced by G_chrcat().

char* G_chrmov ( char *  T,
const char *  F,
int  n 
)

This copies characters from the string F (exactly n characters) into the string T.

The terminating null character is not explicitly written into the string T.

Parameters:
[out]Ttarget string
[in]Fsource string
[in]nnumber of characters to copy
Returns:
T value

Definition at line 131 of file strings.c.

char* G_str_replace ( char *  buffer,
const char *  old_str,
const char *  new_str 
)

Replace all occurencies of old_str in buffer with new_str.

Code example:

 char *name;
 name = G_str_replace ( inbuf, ".exe", "" );
 ... 
 G_free (name);
Parameters:
[in,out]buffermain string
[in]old_strstring to replace
[in]new_strnew string
Returns:
the newly allocated string, input buffer is unchanged

Definition at line 316 of file strings.c.

References PartitionVars::count, G_strdup(), G_strstr(), N, and NULL.

Referenced by db_read_dbmscap(), escape_tcl_string(), and Vect_subst_var().

void G_str_to_lower ( char *  str)

Convert string to lower case.

Parameters:
[in,out]strpointer to string

Definition at line 466 of file strings.c.

int G_str_to_sql ( char *  str)

Make string SQL compliant.

Parameters:
[in,out]strpointer to string
Returns:
number of changed characters

Definition at line 486 of file strings.c.

References PartitionVars::count.

void G_str_to_upper ( char *  str)

Convert string to upper case.

Parameters:
[in,out]strpointer to string

Definition at line 448 of file strings.c.

int G_strcasecmp ( const char *  x,
const char *  y 
)

String compare ignoring case (upper or lower)

Returning a value that has the same sign as the difference between the first differing pair of characters

Parameters:
[in]xfirst string to compare
[in]ysecond string to compare
Returns:
0 the two strings are equal
-1, 1

Definition at line 192 of file strings.c.

Referenced by class_apply_algorithm(), clean_dir(), D_translate_color(), db__copy_table(), db_get_column(), db_table_exists(), dig_file_load(), dig_read_frmt_ascii(), F_generate(), G_ask_datum_name(), G_basename(), G_get_datum_by_name(), G_get_ellipsoid_by_name(), G_get_spheroid_by_name(), G_info_format(), G_parse_color_rule(), G_str_to_color(), GPJ_ask_datum_params(), GPJ_get_datum_by_name(), GPJ_get_datum_transform_by_name(), GPJ_get_ellipsoid_by_name(), GPJ_grass_to_osr(), GPJ_osr_to_grass(), LOC_open_driver(), PNG_Graph_set(), PS_Graph_set(), read_image(), S_read(), submit(), Vect_legal_filename(), and write_image().

char* G_strcat ( char *  T,
const char *  F 
)

This copies characters from the string F into the string T.

This function is similar to G_strcpy(), except that the characters from F are concatenated or appended to the end of T, instead of overwriting it. That is, the first character from F overwrites the null character marking the end of T.

Parameters:
[out]Ttarget string
[in]Fsource string
Returns:
T value

Definition at line 153 of file strings.c.

References G_strcpy().

Referenced by G_site_format(), and read_ellipsoid_table().

char* G_strchg ( char *  bug,
char  character,
char  new 
)

Replace all occurencies of character in string bug with new.

Parameters:
[in,out]bugbase string
[in]charactercharacter to replace
[in]newnew character
Returns:
bug string

Definition at line 287 of file strings.c.

char* G_strcpy ( char *  T,
const char *  F 
)

Copies characters from the string F into the string T.

This function has undefined results if the strings overlap.

Parameters:
[out]Ttarget string
[in]Fsource string
Returns:
pointer to T

Definition at line 46 of file strings.c.

Referenced by G_site_format(), G_str_to_color(), G_strcat(), GVL_get_volname(), and GVL_isosurf_get_att().

char* G_strdup ( const char *  string)

Copies the null-terminated string into a newly allocated string. The string is allocated using G_malloc().

Parameters:
[in]stringthe string to duplicate
Returns:
pointer to a string that is a duplicate of the string given to G_strdup().
NULL if unable to allocate the required space

Definition at line 265 of file strings.c.

References NULL.

Referenced by F_generate(), and G_str_replace().

char* G_strmov ( char *  T,
const char *  F 
)

Copies characters from the string F (not including the terminating null character) into the string T.

Parameters:
[out]Ttarget string
[in]Fsource string
Returns:
T value

Definition at line 109 of file strings.c.

char* G_strncpy ( char *  T,
const char *  F,
int  n 
)

This function is similar to G_chrcpy() but always copies at least n characters into the string T.

If the length of F is more than n, then copies just the first n characters. At the end the null terminator is written into the string T.

Parameters:
[out]Ttarget string
[in]Fsource string
[in]nnumber of characters to copy
Returns:
T value

Definition at line 90 of file strings.c.

Referenced by G__oldsite_get(), and G_site_get().

char* G_strstr ( const char *  mainString,
const char *  subString 
)

Finds the first occurrence of the character C in the null-terminated string beginning at mainString.

Parameters:
[in]mainStringstring where to find sub-string
[in]subStringsub-string
Returns:
a pointer to the first occurrence of subString in mainString
NULL if no occurrences are found

Definition at line 230 of file strings.c.

References NULL, and gui_modules::menuform::q.

Referenced by db_read_dbmscap(), G_oldsite_describe(), G_str_replace(), and GPJ_grass_to_osr().

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines